From eff2ec20b2114d9acd37d796bcc8df9a39213f63 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 16:19:58 +1200 Subject: [PATCH] Fall back to current divider position on resizing --- shared/naturalcrit/splitPane/splitPane.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 5dc8d6e31..d6acedc6f 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -47,7 +47,7 @@ const SplitPane = createClass({ handleWindowResize : function() { // Allow divider to increase in size to last user-set position // Limit current position to between 10% and 90% of visible space - const newLoc = this.limitPosition(this.state.userSetDividerPos, 0.1*(window.innerWidth-13), 0.9*(window.innerWidth-13)); + const newLoc = this.limitPosition(this.state.userSetDividerPos || this.state.currentDividerPos, 0.1*(window.innerWidth-13), 0.9*(window.innerWidth-13)); this.setState({ currentDividerPos : newLoc,