Automattic / antiscroll

OS X Lion style cross-browser native scrolling on the web that gets out of the way.
1.07k stars 162 forks source link

Scrollbar measurement doesn't work on Chrome for Mac OSX 10.7.5 #39

Closed huyl closed 11 years ago

huyl commented 11 years ago

The scrollbar estimation function doesn't work for me (Chrome for OSX 10.7.5)

Here's the fix:

      var w1 = $('div', div).innerWidth();
      div.css('overflow-y', 'scroll');

      // huyl: fix this function (doesn't work on chrome for mac at least)
      // as per http://stackoverflow.com/a/10692895/161972
      //var w2 = $('div', div).innerWidth();
      var w2 = $('<div>').appendTo($('div', div)).width();
huyl commented 11 years ago

Maybe I just don't know how this is supposed to work...