Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd overlay when resizing panels to prevent panes stealing focus #19862
Conversation
|
Just wanted to double check @Aerijo, I saw the TODO in the PR body and peeking at the changed didn't see any tests (or is this behavior not easily testable?), you're still working on this yes? Or is it all set? |
|
@rsese The TODO is for a corresponding issue, which I haven't actually made. As for tests, I don't know if it is testable, but I'll have a look and see if the Dock resize is tested. But the behaviour works as intended. |
alissonpelizaro left a comment •
|
No problem |
|
@rsese Updated the PR with an issue, and checked the specs for if the Dock overlay is tested. I couldn't find any such tests in |
ashthespy
commented
Mar 12, 2020
|
Just a gentle nudge - this would be quite nice to have! :=) |
|
Thanks @Aerijo |
Aerijo commentedSep 1, 2019
•
edited
Requirements for Contributing a Bug Fix
Identify the Bug
#20216
Description of the Change
Adds a div across the whole window when resizing panels.
This div keeps the context on Atom, even when a panel might normally grab it (e.g., if it were an
iframeorwebview). This is relevant for packages that provide this kind of panel, such as ones using the default Mozilla PDF viewer. Adding an overlay is already done by the Dock class.Alternate Designs
I considered if it could be fixed by the package making the iframe in the first place. However, anything that could be done (if at all) would just be a hack, and wouldn't benefit any other packages that use iframes and face the same issue. This fixes the issue at its root.
Possible Drawbacks
My biggest concern is somehow not cleaning up the div after resizing stops. The Dock class already makes a similar overlay, and I am not aware of any issues with it. The method here is somewhat different, but should work so long as
resizeStoppedis called when resizing has stopped.Verification Process
init.jsfileAdditionally:
Notes:
z-indexof 11, and the overlay az-indexof 4. This matches the values used for the dock resize & overlay.The following demonstrate the difference. In the first one, the mouse was not released. In the second, the mouse was released and double clicked to cause the panels to balance.

Old behaviour:
New behaviour:

Release Notes