Merge pull request #9227 from Snuffleupagus/sidebar-resize-left-button

Only resize the sidebar with the left mouse button
This commit is contained in:
Tim van der Meij 2017-12-02 19:42:59 +01:00 committed by GitHub
commit 98457d9e92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,6 +136,9 @@ class PDFSidebarResizer {
_boundEvents.mouseUp = this._mouseUp.bind(this);
this.resizer.addEventListener('mousedown', (evt) => {
if (evt.button !== 0) {
return;
}
// Disable the `transition-duration` rules when sidebar resizing begins,
// in order to improve responsiveness and to avoid visual glitches.
this.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS);