From c7fc3ea062944e6365b991f43f9e82858acd5e16 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 30 Nov 2018 14:21:14 -0500 Subject: [PATCH] Reset the scroll to the top of the inspector when redrawing it --- modules/ui/entity_editor.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ui/entity_editor.js b/modules/ui/entity_editor.js index 5b8ca940d..ddbb5f071 100644 --- a/modules/ui/entity_editor.js +++ b/modules/ui/entity_editor.js @@ -279,6 +279,12 @@ export function uiEntityEditor(context) { _base = context.graph(); _coalesceChanges = false; + // reset the scroll to the top of the inspector + var body = d3_selectAll('.entity-editor-pane .inspector-body'); + if (!body.empty()) { + body.node().scrollTop = 0; + } + var presetMatch = context.presets().match(context.entity(_entityID), _base); return entityEditor