Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add ability to create a new window by dragging a tab out or using right click menu on tab #210

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

pcmccull
Copy link

Fixes #39, by adding the ability to popout a tab into a new window.

When dropping a tab it just checks if the thing that it is being dropped on does not handle the drop. So it only works if the drop effect of the item that it is hovering is "none." That way if you drop the tab onto an application that can handle the link then it doesn't create a new window.

The window is opened using the atom command "application:new-window", which creates a new window that has one Untitled tab. The Untitled tab is then closed and the tab that the user is opening is loaded. If the item being opened in a new window has unsaved changes, they will be moved over to the new window and the tab that is left behind will be closed without warning about unsaved changes.

Dragged and dropped windows try to open at the screen location that they were dropped. That code can be removed if you want to just have it open where ever the atom new-window command would put it.

This open tab in new window code has the same problem as the drag and drop tabs into an existing window code, where Markdown Preview and Project Find Results are blank. This seems to be a problem those packages and not something the tabs package should fix.

Context Menu Example

contextmenunewwindow

Drag and Drop Example

dragtocreatewindow

@mnquintana mnquintana self-assigned this Sep 17, 2015
@tnoetzel
Copy link

Would love to see this merged in or otherwise addressed.

@kradical
Copy link

kradical commented Sep 1, 2016

Just switched over to atom (the appeal of an open source alternative to sublime is high). This is a feature that I used a lot in sublime and can't wait for it to be merged!

@Thargarius
Copy link

Thargarius commented Apr 17, 2017

It would be awesome if this could be done with drag&drop !!
And the majority of all famous code editor support this...

@Benhgift
Copy link

I would really like this. Either in core or in a plugin

@50Wliu
Copy link
Contributor

50Wliu commented Sep 24, 2017

As far as I can tell, there remains a problem when the event transfer action is not none, for example when what is receiving the drop is a browser window. This is troublesome because while it can be detected if the drop event is outside the Atom window or not, it can't be cancelled.

@0x15e
Copy link

0x15e commented Jan 7, 2018

Tried Atom because VS Code can't do this ... only to find Atom can't do it either. Really? Why is this not already implemented? Programmers use multiple monitors. This makes Atom a non-starter for me (same as VS Code was).

@MartinBernstorff
Copy link

This would be awesome! Please review it ❤️

@mnquintana mnquintana removed their assignment Oct 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pop out tabs to create new editor window
9 participants