My website cannot display text/content even though it's showing in the DOM

477 views
Skip to first unread message

Binh Nguyen

unread,
Oct 2, 2017, 2:35:06 AM10/2/17
to Chromium-discuss
Hi,

My website is http://iambinhnguyen.com/. If you scroll down to the Profile/Experience/Projects sections, you will see that no content is being displayed. I believe version 61 update broke my website. I remember visiting it a few weeks ago and it was working fine. My website seems to work on Firefox and Safari. I just did a quick browser test in version 50 and it works fine. Anything idea on what can be done?

-Binh

Jon Perryman

unread,
Oct 5, 2017, 11:55:10 AM10/5/17
to binh...@gmail.com, Chromium-discuss
 I'm guessing you never looked at the developer console. Several exceptions are occurring. Maybe one of them will help you solve your problem.

Regards, Jon.

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

PhistucK

unread,
Oct 5, 2017, 5:42:06 PM10/5/17
to Jon Perryman, binh...@gmail.com, Chromium-discuss
:| I am actually guessing he (a web developer) had a look there.

It shows a Google Maps API warning and some violations (I do not see any error). Chrome 60 shows the same warning, but shows the content, so that warning is unrelated.

You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

Jon Perryman

unread,
Oct 5, 2017, 10:47:27 PM10/5/17
to PhistucK, binh...@gmail.com, Chromium-discuss
Sorry Binh, I tried it out again and I'm not getting messages either. Not sure what I was looking at.

As for your your problem, check your javascript logic where you change the visibility for class "hideme". If you remove the first section or change the second sections "hideme" to "hidemex" will display the second section. Without going thru your code, I can't tell you what has changed.

Good luck, Jon.

PhistucK

unread,
Oct 6, 2017, 3:35:25 AM10/6/17
to Jon Perryman, Binh Nguyen, Chromium-discuss
Since the code is the same, but only the browser updated, this is probably a browser change (albeit, possibly an intentional one).

The code is sniffing the user agent and decides what to scroll (<html> or <body>). I cannot verify that this is the problem, but Chrome 61 no longer uses <body>, it uses <html> instead (in non-quirks mode), so that would be my first guess.

Here is the code (beautified) -
this.checkElements = function() {
          var t = navigator.userAgent.toLowerCase().indexOf("webkit") != -1 ? "body" : "html"

​This needs to use document.scrollingElement instead and fallback to the existing check if it does not exist.​

You seem to be using jQuery Viewport Checker, which fixed it almost a month ago, so consider updating to version 1.8.8.
(I left a comment there regarding the lack of document.scrollingElement)

PhistucK

Jon Perryman

unread,
Oct 6, 2017, 11:33:49 AM10/6/17
to PhistucK, Binh Nguyen, Chromium-discuss
I was saying that Binh's javascript is hiding the text and not making the text visible. Not what is in error.

Scrolling does not seem to be the problem because developer mode mouse over shows the text boxes are there and appropriately sized. In addition, scrolling to the bottom of his page displays text that does not have the hideme class.

I'm not sure why Binh is hiding the text since it's scrollable. Maybe his solution is as simple as removing the visibility attribute.

Regards, Jon.

PhistucK

unread,
Oct 6, 2017, 11:56:17 AM10/6/17
to Jon Perryman, Binh Nguyen, Chromium-discuss
I actually saw the the last part simply did not receive the "active" class when you scroll to the bottom, so scrolling does seem to be related here.


PhistucK

PhistucK

unread,
Oct 6, 2017, 11:59:39 AM10/6/17
to Binh Nguyen, Chromium-discuss, Jon Perryman
Chrome did not remove anything in this regard, it just switched the main, default scrolling element to be <html> instead of <body>, like the specification requires and like other browsers (modulo Safari. And possibly Edge because of Chrome) do.
If you use overflow: auto or similar on <body>, body.scrollTop should yield non-zero values.


PhistucK

On Fri, Oct 6, 2017 at 6:47 PM, Binh Nguyen <binh...@gmail.com> wrote:
Hi all,

I thought I posted a reply earlier, but it did not go through. Turns out my viewport checker library was not up to date and Chrome had fully removed some native methods like body.scrollTop (which the library uses a lot). This was heavily used through my website. Anyways, I updated the library and did a bit of additional refactoring to fix it.
Thanks for everyone's help.

-Binh
.

Binh Nguyen

unread,
Oct 7, 2017, 5:14:02 PM10/7/17
to Chromium-discuss, binh...@gmail.com, jon.pe...@gmail.com
Ooooh I see, my mistake. This is actually insightful. I'll take a look into this more later. Thanks again for the help!

-Binh

Binh Nguyen

unread,
Oct 7, 2017, 5:14:14 PM10/7/17
to Chromium-discuss
There was a scrollTop logic that was out of date in one of my libraries (viewport checker). I had to update that and other miscellaneous jQuery code. I then emptied my browser cache and did a hard reload and my website works! Thanks for the help everyone!
Reply all
Reply to author
Forward
0 new messages