atom / tabs

Tabs in Atom
MIT License
111 stars 115 forks source link

Remove tabs correctly when dropped on another window #555

Closed 50Wliu closed 5 years ago

50Wliu commented 5 years ago

Requirements

Description of the Change

The method signature for IPC callbacks is (event, args...), but the tabs package was using (args...) instead. This meant that when dropping a tab onto another Atom window, the original tab would never be destroyed as intended.

Alternate Designs

None.

Benefits

This fixes a long-standing bug with dropping tabs on other windows, which was not discovered by the tests as they called the callback manually.

Possible Drawbacks

The specs are a little hacky...since the listener callback is binded, it's almost impossible to spy on it correctly. So I resorted to spying on a function that the callback calls.

Applicable Issues

None.