mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
This commit is contained in:
parent
b51e16c255
commit
2d4fc08f2b
@ -594,12 +594,20 @@
|
||||
// calculate by yourself by accumulating wheel events.
|
||||
// https://github.com/laurent22/joplin/pull/5496
|
||||
// When the Electron/Chromium bug is fixed, remove this listener.
|
||||
//
|
||||
// 2024-02-01: The bug seems to be fixed, remove the above when we're not in
|
||||
// feature-freeze.
|
||||
|
||||
// If scrollTop ever has a fraction part, zoomFactor is not 1.
|
||||
if (zoomFactorIsNotOne || !Number.isInteger(contentElement.scrollTop)) {
|
||||
zoomFactorIsNotOne = true;
|
||||
customScroll(e, true);
|
||||
e.preventDefault();
|
||||
|
||||
// The custom scroll logic breaks horizontal scroll in child DOM nodes
|
||||
// (e.g. scrollable code blocks). Disable it:
|
||||
if (e.deltaY !== 0) {
|
||||
customScroll(e, true);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user