Summary: | REGRESSION (r17597): Command-return in text fields doesn't open a new tab or window | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniele Metilli <daniele.metilli> | ||||
Component: | DOM | Assignee: | Darin Adler <darin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin, mitz | ||||
Priority: | P1 | Keywords: | Regression | ||||
Version: | 420+ | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
Attachments: |
|
Description
Daniele Metilli
2006-11-17 04:20:09 PST
Could you please provide an example? I'm afraid I don't understand what the issue is. Oops, I meant Command-return, not Command-click! Example: 1 - Go to imdb.com 2 - Type something in the field on the left 3 - Command-return The resulting page will be loaded in the same tab, and it shouldn't. Confirmed. The regression is due to r17597, specifically "added DOM Event parameters to various functions so that the handlers can use the DOM Event instead of the global "current NSEvent";". The problem is that when a Command-Return keyboard event triggers a simulated click event, the click event doesn't inherit the modifiers from the mouse event. This affects not only form fields but also focused links, and breaks to the Option modifier as well. I think everything funnels through HTMLElement::click(), and in the relevant cases the caller to click() still has the original keyboard event which it could pass along if click() were modified to take it. Sounds like a good approach. I'll try to fix this. Got a patch -- writing release notes for review. Created attachment 11706 [details]
patch
Comment on attachment 11706 [details]
patch
r=me
Committed revision 17976. Note that this actually had nothing to do with native text fields! Oops, Command-Return on a focused link is still broken. (In reply to comment #11) > Oops, Command-Return on a focused link is still broken. > Two reasons for that. One is that HTMLAnchorElement::defaultEventHandler() neglects to pass the original event to dispatchSimulatedClick(). The other is that even if it did, findKeyStateEvent() stops at the simulated click event, which doesn't have the correct modifier state. I'm reopening this bug, but if you feel that a new bug is needed, just close this one again and I'll file a new one. (Forgot to reopen) Comment on attachment 11706 [details]
patch
Clearing the review flag to keep the bug from showing in the commit queue.
Darin fixed the "focused link" case in r18012 (even though he would have preferred having a separate bug for that case!). Thanks, Darin! Command-clicking a form's submit button is still broken. I will file a separate bug on that :-) |