From f305e8a12912bec28c531df9737571b95be4f025 Mon Sep 17 00:00:00 2001 From: ewya Date: Tue, 14 Jul 2020 21:04:05 +0200 Subject: [PATCH] Prevent scrolling tree.$container into view. (#1019) Right on time ;-) --- CHANGELOG.md | 2 ++ src/jquery.fancytree.edit.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dd05f68..077e6544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # 2.35.1-0 / Unreleased + * [Fixed] #921 ext-edit / focus handling: Internet Explorer scrolls briefly + to the top/left after editing if the tree container is partially outside the viewport * [Fixed] #1001 Invalid urls in skin-xp CSS * [Fixed] ext-dnd5: dropEffectCallback=none was not reset in some cases * [Changed] #1005 Cast key to string in getNodeByKey() diff --git a/src/jquery.fancytree.edit.js b/src/jquery.fancytree.edit.js index 98dd81ea..4ba43cfe 100644 --- a/src/jquery.fancytree.edit.js +++ b/src/jquery.fancytree.edit.js @@ -217,7 +217,7 @@ } // Set keyboard focus, even if setFocus() claims 'nothing to do' - $(tree.$container).focus(); + $(tree.$container).focus({ preventScroll: true }); eventData.input = null; instOpts.close.call(node, { type: "close" }, eventData); return true;