Hitting the Escape key should close the teleport dialog box (window).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | teleport-esc-click-close-ie.patch | 3.56 KB | jjeff |
| #7 | teleport.js_.txt | 2.74 KB | jjeff |
| #5 | teleport-esc-click-close.patch | 2.98 KB | jjeff |
Hitting the Escape key should close the teleport dialog box (window).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | teleport-esc-click-close-ie.patch | 3.56 KB | jjeff |
| #7 | teleport.js_.txt | 2.74 KB | jjeff |
| #5 | teleport-esc-click-close.patch | 2.98 KB | jjeff |
Comments
Comment #1
xanoHmm, I'm thinking if it would be wise to use ESC as a hotkey. It's not unlikely some software on the user's computer has already used ESC for some feature. I think normal hotkeys like what's being used at this moment would be best. Not best for the module itself in means that using the module won't become easier, but best in means that it won't conflict with other software and that it's consistent.
Remember, it's not Quicksilver, just an imitation, a web 'application'.
Comment #2
incidentist commentedOh, I think it's a good idea. There've been a bunch of times when I've reflexively hit Esc and expected Teleport to close. Also, the standard autocomplete form already intercepts Esc to hide the list of autocompleted items. I've just got to change that interception to close the whole dialog if the list is already hidden.
Comment #3
moshe weitzman commentedFYI, I expected this too.
Comment #4
jjeff commentedOkay, here's a patch that does the following things:
1) Makes the ESC key close the modal box.
2) Makes any click anywhere outside of the modal box close Teleport
3) Changes the show/hide actions to fadeIn/fadeOut so that the whole box fades in/out rather than animating size
Other things to be aware of with this patch.
* It adds an id of "teleport-button" to the teleport button. This is needed in order to exclude it from the document.click action.
* The patch removes a few lines of what looked like leftover variable definitions.
Comment #5
jjeff commentedd'oh... here's the patch...
Comment #6
jjeff commentedpatch is actually against 5.x... dunno if .js files are the same between versions...
Comment #7
jjeff commentedOkay, I'll admit this is getting ridiculous now.
Here's a patch that (in addition to the above features) adds IE compatibility by changing the method from the 'accesskey' trick to a $(document).keydown() listener.
Tested and working in Safari (Mac), Firefox (Mac), and Internet Explorer (Win). NOT working in Opera on the Mac, but also not breaking anything.
Technically this is a fix to another issue, but since it builds on the code for this issue/patch, I thought it made more sense to post here.
At this point, the patch is larger than the entire teleport.js file, so I've also included the entire file here too.
Comment #8
incidentist commentedRidiculous? Ridiculously awesome, more like. I'll take a look and try to commit it within the next couple of days. I looked briefly at the IE accesskey issue, and it looks like there may be a non-hack solution but it is (blissfully) difficult for me to get access to an IE6 box for testing.
Comment #9
psynaptic commentedI'll can test IE (as well as other browsers on Win) and also any browsers on Mac too. Just let me know and I'm there.
Comment #10
jjeff commentedPsynaptic, yes, please test! Any and all testing is always helpful.
Thanks.
Comment #11
psynaptic commentedHey Jeff, I've just check my track and found this.
I'm working on a client site right now but will do some testing on this ASAP. Is there anything you feel needs particular attention?
Comment #12
psynaptic commentedI've been testing and it seems to work well so far. The only problem I have is that I like to use ` backtick/tilde key to invoke. I'll try and see if I can fix it.
Comment #13
incidentist commentedApplied the patch, tested on FF/Mac and IE6. Works well so I committed it.
Comment #14
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.