diff --git a/lib/minimap-element.coffee b/lib/minimap-element.coffee index a5dc2f25..d10727fa 100644 --- a/lib/minimap-element.coffee +++ b/lib/minimap-element.coffee @@ -370,7 +370,7 @@ class MinimapElement extends HTMLElement # Internal: Polling callback used to detect visibility and size changes. pollDOM: -> if @isVisible() - @requestForcedUpdate() unless !@wasVisible + @requestForcedUpdate() unless @wasVisible @measureHeightAndWidth(false) diff --git a/spec/minimap-element-spec.coffee b/spec/minimap-element-spec.coffee index 19286ae2..497270d6 100644 --- a/spec/minimap-element-spec.coffee +++ b/spec/minimap-element-spec.coffee @@ -267,6 +267,8 @@ describe 'MinimapElement', -> describe 'from hidden to visible', -> beforeEach -> + editorElement.style.display = 'none' + minimapElement.checkForVisibilityChange() spyOn(minimapElement, 'requestForcedUpdate') editorElement.style.display = '' minimapElement.pollDOM()