RESOLVED INVALID 110004
Selection doesn't change when clicked on an image element
https://bugs.webkit.org/show_bug.cgi?id=110004
Summary Selection doesn't change when clicked on an image element
nvineeth
Reported 2013-02-15 23:39:21 PST
document.onselectionchange is not fired when we click on an img. I have attached simple html page using which this is reproducible. Clicking anywhere in the <p> tag results in onselectionchange being called, but this not fired when clicked on the img. Verified on Chrome 24 on Windows 7 and OSx 10.7 as well. Thanks.
Attachments
test html page to reproduce the problem. (532 bytes, application/zip)
2013-02-15 23:41 PST, nvineeth
no flags
Patch for HTMLImageElement.cpp (389 bytes, patch)
2013-02-18 05:57 PST, Aneesh
rniwa: review-
nvineeth
Comment 1 2013-02-15 23:41:39 PST
Created attachment 188696 [details] test html page to reproduce the problem.
Aneesh
Comment 2 2013-02-18 05:55:40 PST
Returning 'true' from HTMLImageElement::CanStartSelection() will fix this issue.
Aneesh
Comment 3 2013-02-18 05:57:40 PST
Created attachment 188866 [details] Patch for HTMLImageElement.cpp Please review.
Ryosuke Niwa
Comment 4 2013-02-18 10:48:51 PST
This isn't about selectionchange event not being fired. It's just that WebKit doesn't move selection when clicked on an image element. Given that this is also the behavior observed on Firefox and native applications like TextEdit, I don't think we should change our behavior.
Ryosuke Niwa
Comment 5 2013-02-18 10:50:20 PST
Comment on attachment 188866 [details] Patch for HTMLImageElement.cpp r- because the current behavior is desirable.
Tony Chang
Comment 6 2013-02-19 15:05:35 PST
It looks like this is an invalid bug report. FWIW, I get the same behavior in Firefox as I do in WebKit, which makes me think that the existing behavior is correct.
Lucas Forschler
Comment 7 2019-02-06 09:19:14 PST
Mass move bugs into the DOM component.
Ryosuke Niwa
Comment 8 2019-02-06 21:04:39 PST
Another bug which belongs to UI Events.
Note You need to log in before you can comment on or make changes to this bug.