Closed Bug 873418 Opened 7 years ago Closed 7 years ago

contentEditable elements are not considered clickable by the event fluffing code

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (obsolete) — Splinter Review
Sounds like a contentEditable item should be considered like an input element.

(Gaia use a contentEditable area for writing sms/mms).
Attachment #750971 - Flags: review?(roc)
Comment on attachment 750971 [details] [diff] [review]
Patch

Review of attachment 750971 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/PositionedEventTargeting.cpp
@@ +155,5 @@
>      if (content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::role,
>                               nsGkAtoms::button, eIgnoreCase)) {
>        return true;
>      }
> +    if (content->HasAttr(kNameSpaceID_None, nsGkAtoms::contenteditable)) {

I think you should call IsEditable. We want to the descendants of a contenteditable element return true here too.

And please add a test.
Attached patch Patch v2 + testsSplinter Review
Assignee: nobody → 21
Attachment #750971 - Attachment is obsolete: true
Attachment #750971 - Flags: review?(roc)
Attachment #758179 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/eeb4c68989f3
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.