I knew that was coming, tommy -- I was too lazy to check the wording myself!
Buffistechnology 2: You Made Her So She Growls?
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
I knew that was coming, tommy -- I was too lazy to check the wording myself!
I pulled the wording from memory (pretty sure it's close). Think of all the time I'll save by not having to google Serenity quotes, and all I had to do was see the movie seven times in the theater.
In a web page, why does the javascript onblur event get fired for a select combobox when I hit the 'Esc' key after typing into the select combobox?
In a web page, why does the javascript onblur event get fired for a select combobox when I hit the 'Esc' key after typing into the select combobox?
The onblur event fires when a control loses focus. Hitting the Esc key causes it to lose focus (IIRC).
Well, that's... dumb counterintuitive.
Huh. The onChange event fires too. That's less counterintuitive, but still not what I want.
OK, so I need to use the onKeyDown or onKeyPress events to set a flag when the user hits escape, which will tell the functions that the onChange and onBlur events call to do nothing for that case. Then I need to reset the flag back. It's that setting the flag back part that bugs me - I can't think of a non-kludgey way to do it. And it needs to be set back after all the events are done firing.
If memory serves, the events are fired in order, so you could try setting the flag back in the last event. I can't find a definitive listing of the event order offhand, but I'm sure a little experimenting will tell you where to put it.
I'm thinking something like this at the top of the last event's function:
if ($flag) { $flag = 0; return; }
One other thing you might try from the onkeypress event's function is to set the subsequent events to null:
document.[formname].[controlname].onblur = null; document.[formname].[controlname].onchange = null;
I'm not sure if that'll kill those events for good, or for just that execution, so play around with it.
Not sure if I'm being helpful, but maybe it'll give you some ideas.
Thanks Eddie.
My boss and I messed around with it, and he decided that the whole thing was just too complicated to mess around with just to fix a tiny bug. (There's pages of code associated with just that one select combobox.)
My Powerbook's Bluetooth is erratic. As in, not there when I need it. Last time it took a lot of rebooting to get it to act right again.
Where does one start troubleshooting that? With support, or is there anything I can do myself?
ita, I had the exact same problem (which got worse and worse), except it was with the Bluetooth device itself (an Apple wireless keyboard). I know this because another Bluetooth device (Apple mouse) continued to work fine. (This was with my Mini, using a USB Bluetooth thingie plugged into the Mini.)
So, have you confirmed that the problem is with the Powerbook, and not the external device?
have you confirmed that the problem is with the Powerbook, and not the external device?
Yup. I can't get my phone or PDA to talk to it right now, and they both talk to each other and the PC just fine.
Also, when I change Bluetooth settings on the Powerbook, it takes a really long time. The little runic B on that top bar stays highlighted for a couple minutes if I do something like change the status of discoverability. That's new. And disheartening.