diff --git a/spec/extensions/tree-view-spec.coffee b/spec/extensions/tree-view-spec.coffee index 2edba773b..07e2adc4e 100644 --- a/spec/extensions/tree-view-spec.coffee +++ b/spec/extensions/tree-view-spec.coffee @@ -306,7 +306,7 @@ describe "TreeView", -> beforeEach -> fileElement.click() treeView.trigger "tree-view:move" - moveDialog = treeView.find(".move-dialog").view() + moveDialog = rootView.find(".move-dialog").view() it "opens a move dialog with the file's current path populated", -> expect(moveDialog).toExist() @@ -316,8 +316,8 @@ describe "TreeView", -> describe "when the move dialog's editor loses focus", -> it "removes the dialog", -> - treeView.attachToDom() - treeView.focus() + rootView.attachToDom() + rootView.focus() expect(moveDialog.parent()).not.toExist() diff --git a/src/extensions/tree-view.coffee b/src/extensions/tree-view.coffee index 857b12cef..c33b1622a 100644 --- a/src/extensions/tree-view.coffee +++ b/src/extensions/tree-view.coffee @@ -72,13 +72,7 @@ class TreeView extends View @rootView.open(selectedEntry.attr('path')) move: -> - entry = @selectedEntry() - dialog = new MoveDialog(@rootView.project, entry.attr('path')) - @append dialog - - dialog.css - top: entry.position().top + entry.outerHeight() + @scrollTop() - left: 0 + @rootView.append(new MoveDialog(@rootView.project, @selectedEntry().attr('path'))) selectedEntry: -> @find('.selected') diff --git a/static/tree-view.css b/static/tree-view.css index 5f7f0bff0..75d2b7409 100644 --- a/static/tree-view.css +++ b/static/tree-view.css @@ -37,9 +37,10 @@ .move-dialog { position: absolute; + bottom: 0; width: 100%; background-color: #444; border: 2px solid #222; -webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5); -} \ No newline at end of file +}