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
All Windows/dialogs Should Repspond to Close Window Keystroke #1085
Comments
cmd/control - w works for me when I view a userscript on both the http:// and file:/// protocols on mac osx and windows xp (firefox 3.6). WCityMike can you please create a blank firefox profile and only install greasemonkey then confirm that this is an issue for you? if it is still an issue then please let us know what version of firefox, what os, and what version of your os you are using? Otherwise I'd tag this w/ 'wontfix'.. |
When I spoke to the "Greasemonkey userscripts window," I meant the "Manage User Scripts" window, which does not respond to Command-W even when using a brand-new Firefox profile. Please let me know if you can't reproduce that. |
Ah I see now, I can confirm that is an issue for me as well. |
Hmm it looks like the "Manage User Scripts" window will be removed in 0.9, because when issue 1086 is implemented the manage window will no longer be needed and will be removed (it already is in this branch) |
This issue exists for the newscript.xul and install.xul as well, so I thought I'd make a patch for it, here it is. |
For suggested patches, I seem to have not made myself clear. Mac is the only platform for which XXX-W is the "close window" hotkey. No other platform should be affected. Neither Linux or Windows have an XXX-W shortcut standard to mean "close window". On Windows definitely, and most Linuxen by following, it's Alt-F4. That hotkey already works in all cases I've tested. |
Have you tried the FF downloads window? the addons window? the console window? they all close by ctrl+w on Windows & Linux.. |
Good point. Firefox is so inconsistent with when it chooses to act like programs in that OS should, and when it chooses to just do things the same regardless of platform. In that case let's mirror FF, and it's straightforward to use a < key > in the XUL rather than a bunch of JS. |
I think it's a good usability feature for power users as well, and I can only guess that is why it was included in some parts of FF in the first place.
How do you put conditions on a xul element based on the os that the user is using? so that modifiers="meta" on mac and modifiers="control" otherwise? If you need js then I think the pure js option is better. |
You don't, you use "accel" which performs that logic for you. https://developer.mozilla.org/en/XUL/key#a-modifiers |
Edit: Bah, got ninja'd by erik while posting this and looking up the code :/ Anyway, here's the code the error console etc. are using (shortened): <commandset> <command id="cmd_close" oncommand="close();"> </commandset> <keyset> <key id="key_close" key="w" modifiers="accel" command="cmd_close"> <key id="key_close2" key="VK_ESCAPE" command="cmd_close"> <keyset> To see the full code, take a look at the error console's xul file (view-source:chrome://global/content/console.xul). |
ah cool
also cool
When issue 1086 is implemented, the manage window will be removed, and the addons window already has this issue taken care of, but there will be a new global options window which I'd like to see the ctrl/cmd-w key (and esc key) close. I'd also like to see these hotkeys close GM's newscript.xul and install.xul. Before Ventero's edit he made a good point about how the cmd/ctrl-w & esc hotkeys seems to be a ~standard to close FF sub windows:
He and I spoke on irc, and he also mentioned that ctrl-w doesn't close some windows on Windows, but does work on Linux, like the preferences (or also the about window I noticed) window, but the esc key still works here. |
I've updated the title of this ticket a bit. In short: Firefox has its own sort of scheme for what keyboard shortcuts should close windows/dialogs. We should make sure we're consistent with that for all windows or dialogs we control. |
Here is my branch for this issue. |
doesn't remove temporary files when you press ctrl+w on the install window. |
commit 5720130 |
I cannot close the Greasemonkey userscripts window using Cmd-W; I have to close the window using the mouse. While it may seem like a small thing to some, it's a semi-significant inconvenience.
The text was updated successfully, but these errors were encountered: