 
       @aceEditor.session.setScrollTop oldScrollTop
 
-      @dropletElement.style.top = @dropletElement.style.left =
+      @dropletElement.style.top = @dropletElement.style.left = '-9999px'
+      if paletteVisibleInNewState
+        @paletteWrapper.style.top = @paletteWrapper.style.left = '0px'
+      else
         @paletteWrapper.style.top = @paletteWrapper.style.left = '-9999px'
-      @aceElement.style.top = @aceElement.style.left = '0px'
+
+      @aceElement.style.top = '0px'
+      if paletteVisibleInNewState
+        @aceElement.style.left = "#{@paletteWrapper.offsetWidth}px"
+      else
+        @aceElement.style.left = '0px'
+
       @currentlyUsingBlocks = false
 
       @lineNumberWrapper.style.display = 'none'

        pressedXKey = false

    @copyPasteInput.addEventListener 'input', =>
      if pressedVKey
        try
          str = @copyPasteInput.value; minIndent = Infinity

    @handwrittenBlocks = []

  hook 'keydown', 0, (event, state) ->
    if @readOnly
      return
    if event.which is ENTER_KEY
      if not @textFocus? and not event.shiftKey
        @setTextInputFocus null
