mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Electron: Fixes #847: Prevent view from scrolling to top when clicking checkbox and editor not visible
This commit is contained in:
parent
0bd19c97eb
commit
ed89f55bff
@ -1366,7 +1366,11 @@ class NoteTextComponent extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (visiblePanes.indexOf('editor') < 0) {
|
if (visiblePanes.indexOf('editor') < 0) {
|
||||||
editorStyle.display = 'none';
|
// Note: Ideally we'd set the display to "none" to take the editor out
|
||||||
|
// of the DOM but if we do that, certain things won't work, in particular
|
||||||
|
// things related to scroll, which are based on the editor. See
|
||||||
|
// editorScrollTop_, restoreScrollTop_, etc.
|
||||||
|
editorStyle.width = 0;
|
||||||
viewerStyle.width = innerWidth;
|
viewerStyle.width = innerWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user