Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using shortcut Cmd/Ctrl-W on a window with multiple tabs closes the entire window instead of focused tab #16436

Closed
balsa-sarenac opened this issue Apr 10, 2024 · 5 comments · Fixed by #16492
Assignees
Labels
To fix before release Issure to fix before the upcoming Pharo release

Comments

@balsa-sarenac
Copy link
Member

Bug description
Using shortcut Cmd/Ctrl-W on a window with multiple tabs closes the entire window instead of focused tab

To Reproduce
Steps to reproduce the behavior:

  1. Open a senders window for a method and then fill it with tabs (look for implementors and senders of some method)
  2. Press Cmd/Ctrl-W
  3. Entire window is closed

Expected behavior
Only the focused tab should be closed.

@balsa-sarenac balsa-sarenac added the To fix before release Issure to fix before the upcoming Pharo release label Apr 10, 2024
@Ducasse
Copy link
Member

Ducasse commented Apr 10, 2024

Thanks a lot because recently I could not really work with P12 since I was always closing the messageList when I just press ctrl -w to close a pane. Now I got it.

@tesonep tesonep self-assigned this Apr 16, 2024
tesonep added a commit to tesonep/pharo that referenced this issue Apr 16, 2024
- Adding a closeByShortcut so windows can react different
- Renaming closeTopWindow to closeTopWindowByShortcut
- Adding an entry point so submorphs can collaborate with the window
- ClyGroupWindowMorph can handle the event and remove one of the panes
@guillep
Copy link
Member

guillep commented Apr 19, 2024

We investigated a bit here. The problem seems to be that there is a global shortcut that "closes the top window"

imagen

@guillep
Copy link
Member

guillep commented Apr 19, 2024

We chased the bug up to.

FTTableMorph >> initializeShortcuts: aKMDispatcher

	super initializeShortcuts: aKMDispatcher.
	aKMDispatcher attachCategory: #WindowShortcuts

This means that all tables, regardless of where they are embedded, will for the closing of the top window.
It's however not clear what would we impact if we remove this.

@guillep
Copy link
Member

guillep commented Apr 19, 2024

This issue was introduced in #16386 as an attempt to fix #16313.

However, to me this fix does not work, I don't think tables should support window shortcuts.
But we should reopen the original issue if we remove this.

@hernanmd
Copy link
Contributor

This issue was introduced in #16386 as an attempt to fix #16313.

However, to me this fix does not work, I don't think tables should support window shortcuts. But we should reopen the original issue if we remove this.

Thanks for taking a look in this.

I think the issue report is incomplete. It doesn't mention where should be the focus, so now to close the whole window one should click in the SystemWindow. So the problem isn't the Ctrl/CMD+W but where to set the focus after a window is opened or closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
To fix before release Issure to fix before the upcoming Pharo release
Projects
None yet
5 participants