Closed Bug 1459379 Opened 7 years ago Closed 7 years ago

Can't addEventListener to <i> element

Categories

(Core :: DOM: Events, defect)

61 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1089326

People

(Reporter: me, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 Steps to reproduce: I addEventListener('click') to <i> element, and clicked it. ielement.addEventListener('click', () => console.log('clicked')) Actual results: the function was not called. Expected results: the function should be called
Attached file click.html (deleted) —
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 20180504220115 Works for me.
Component: Untriaged → DOM: Events
Keywords: testcase
Product: Firefox → Core
WFM too. Reporter, can you provide a minimal testcase showing the issue. Please attach the testcase using 'Add an attachment ' link.
Attached file clicked (deleted) —
When i surround the <i> with a <button>, the function will not be called.
(In reply to me from comment #3) > Created attachment 8973443 [details] > clicked > > When i surround the <i> with a <button>, the function will not be called. by the way, it works in both Chrome and Safari except Firefox
ok, nothing to do with <li>, but <button>. We implement <button> the way it was defined in HTML4, but the spec has changed. In Gecko nothing inside <button> gets mouse events, only the <button> itself.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: