Closed
Bug 214373
Opened 21 years ago
Closed 21 years ago
enter does not work on image maps
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
People
(Reporter: rivdsl, Assigned: bryner)
References
(Blocks 1 open bug, )
Details
(Keywords: access, regression)
Attachments
(1 file, 1 obsolete file)
941 bytes,
patch
|
jst
:
review+
jst
:
superreview+
asa
:
approval1.7+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1
When you tab trough an image map, pressing enter or ctrl+enter when the focus
ring is around one of the areas doesn't do anything. I think it should open the
associated URL, because when you press shift+F10 and choose 'open link in new
tab' it will open the URL.
Reproducible: Always
Steps to Reproduce:
1.goto http://members.chello.nl/j.vandersluijs/moztest/
2.press tab a few times until the focus ring is around one of the buttons
3.press enter
Actual Results:
nothing happens
Expected Results:
Open the correct link in the same window
Comment 1•21 years ago
|
||
Confirming; I thought this used to work...
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Comment 2•21 years ago
|
||
Man, when did this break?
Not sure if this is related but clicking on the image here titled "download"
which is an image map doesn't work when clicked on with the mouse.
http://www.myob.com/us/downloads/downloads/mac_applescripts.htm
Comment 4•21 years ago
|
||
*** Bug 228275 has been marked as a duplicate of this bug. ***
Comment 5•21 years ago
|
||
Made the title more searchable. Is this happening because AREA isn't really a
link, like A and LINK?
Summary: Enter or ctrl+enter does not work on imagemaps → enter does not work on image maps
Comment 6•21 years ago
|
||
This is a regression from bug 124789. The basic problem is that
nsPresShell::HandleEvent no longer sets mCurrentEventContent from the ESM. It
just sets mCurrentEventFrame and then later gets the content from the frame.
Problem is, for <area> elements the event frame is the imageframe but the event
content needs to be the <area> content. This works for click events because of
the hack in nsImageFrame::GetContentForEvent, but key events end up getting
delivered to the <img> node instead of the <area> node in this testcase....
If I just add a call to GetFocusedContent (setting mCurrentEventContent) at the
same place in nsPresShell::HandleEvent that calls GetFocusedFrame, key events on
<area> start working again....
Assignee: aaronlev5 → bryner
Keywords: regression
Comment 7•21 years ago
|
||
*** Bug 232995 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 8•21 years ago
|
||
This does what boris described. This seems like the right fix... the problem
just didn't affect tabbing since PostHandleEvent works off of the frame, not
the content.
(The other way we could do this is to make nsImageFrame::GetContentForEvent
return the focused area for key events. That seems unnecessary though.)
Assignee | ||
Comment 9•21 years ago
|
||
don't mess up the refcounting...
Assignee | ||
Updated•21 years ago
|
Attachment #144155 -
Attachment is obsolete: true
Assignee | ||
Comment 10•21 years ago
|
||
Comment on attachment 144157 [details] [diff] [review]
better patch
Here's a little background info that might be helpful for reviewing:
When focus is in an image map, the ESM keeps the focused frame (used for
Pre/PostHandleEvent) set to the image frame and sets the focused content to the
area element. We need to make sure mCurrentEventContent is set to the ESM's
mCurrentFocus, or we will end up calling nsImageFrame::GetContentForEvent() and
it does not know to return the focused area for key events. (For non-imagemap
elements, the focused frame will simply return mContent when GetContentForEvent
is called).
Attachment #144157 -
Flags: superreview?(jst)
Attachment #144157 -
Flags: review?(jst)
Comment 11•21 years ago
|
||
Comment on attachment 144157 [details] [diff] [review]
better patch
r+sr=jst
Attachment #144157 -
Flags: superreview?(jst)
Attachment #144157 -
Flags: superreview+
Attachment #144157 -
Flags: review?(jst)
Attachment #144157 -
Flags: review+
Assignee | ||
Comment 12•21 years ago
|
||
Comment on attachment 144157 [details] [diff] [review]
better patch
requesting approval for 1.7 final
Attachment #144157 -
Flags: approval1.7?
Comment 13•21 years ago
|
||
Comment on attachment 144157 [details] [diff] [review]
better patch
a=asa (on behalf of drivers) for checkin to 1.7
Attachment #144157 -
Flags: approval1.7? → approval1.7+
Assignee | ||
Comment 14•21 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 15•19 years ago
|
||
We suspect this caused regression:
https://bugzilla.mozilla.org/show_bug.cgi?id=307172
Comment 16•19 years ago
|
||
(In reply to comment #15)
> We suspect this caused regression:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=307172
I can confirm that. And it's an issue in 1.7.x, branch and trunk.
Updated•6 years ago
|
Component: Keyboard: Navigation → User events and focus handling
Comment 17•6 years ago
|
||
Keywords: sec508
You need to log in
before you can comment on or make changes to this bug.
Description
•