From d7019caec52d76eb28e9f1c5d226ada4a7b6f1b7 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 29 Sep 2022 12:09:18 +0200 Subject: [PATCH] Fix sidebar splitter no longer respects its minsize value --- api/js/framework/fw_ui.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/js/framework/fw_ui.js b/api/js/framework/fw_ui.js index dd49b855ee..b345b0ac2d 100644 --- a/api/js/framework/fw_ui.js +++ b/api/js/framework/fw_ui.js @@ -1353,13 +1353,20 @@ window.egw_fw_ui_splitter.prototype.dragHandler = function(event) this.constraints[0].size += delta; this.constraints[1].size -= delta; + // reset the size to minsize if it's dragged beyond it + if (this.constraints[0].size + delta <= this.constraints[0].minsize) + { + this.constraints[0].size = this.constraints[0].minsize; + return; + } + this.resizeCallback(this.constraints[0].size, this.constraints[1].size); }; window.egw_fw_ui_splitter.prototype.dragStopHandler = function(event) { - return; // let draghandler taking care of resize callback + this.resizeCallback(this.constraints[0].size, this.constraints[1].size); }; /**