Skip to content

Commit

Permalink
dashboard: for Chrome 63+, use the faster `overscroll-behavior: conta…
Browse files Browse the repository at this point in the history
…in` instead of attaching an onwheel event.
  • Loading branch information
ivan committed Dec 7, 2017
1 parent 70dc5cb commit c6c5bde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libgrabsite/__init__.py
@@ -1 +1 @@
__version__ = '1.4.4'
__version__ = '1.4.5'
5 changes: 4 additions & 1 deletion libgrabsite/dashboard.html
Expand Up @@ -187,6 +187,7 @@
margin: 0 0 1em 0;
border-radius: 3px;
box-shadow: 4px 4px 17px 0px #0000001c;
overscroll-behavior: contain;
}

.log-window-hidden {
Expand Down Expand Up @@ -823,7 +824,9 @@
// starts to scroll the page instead. We prevent this behavior here.
// If the user wants to scroll the page, they need to move their
// mouse outside a log window first.
if(!isSafari) {
if(isChrome && getChromeMajorVersion() >= 63) {
// No need to attach an event; .log-window { overscroll-behavior: contain } will take care of it.
} else if(!isSafari) {
logWindowAttrs["onwheel"] = function(ev) {
// Note: offsetHeight is "wrong" by 2px but it doesn't matter
//console.log(ev, logWindow.scrollTop, (logWindow.scrollHeight - logWindow.offsetHeight));
Expand Down

0 comments on commit c6c5bde

Please sign in to comment.