mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Move-dialog overlays the bottom of the RootView instead of appearing next to the element
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user