Google Chrome problem: scroll down to the bottom when zooming out

I am using the standard way to determine the scroll position to enable the button when the user scrolls down. it works great at 100% zoom until you zoom out.

http://jsfiddle.net/ruslans/94qmk4t6/ (try increasing to 90% / 75%)

       function ViewModel() {
           this.scrolledToBottom = ko.observable(false);
           this.onScroll = function (data, event) {
               var el = event.target,
                   $el = $(el),
                   scrollPosition = $el.scrollTop() + $el.innerHeight();

               if ($el.scrollTop() === 0) return;
               this.scrolledToBottom(scrollPosition >= (el.scrollHeight));
           };
       }

      

Is there an optional workaround that I could use?

+3


source to share


1 answer


Here's a link to answer your question about viewport and DOM validation. Several links are needed for more specific answers.



As for your question and how you attack the problem, you check for scroll events. I think your solution should solve your problem for small texts as well as scrollable ones. Your problem may manifest itself in other ways, such as higher resolution screens (4k are becoming popular) not having scrollbars due to large windows.

0


source







All Articles