[webkit-dev] onselectionchange when clicked on img

Ryosuke Niwa rniwa at webkit.org
Fri Feb 15 10:11:32 PST 2013


Possibly. Please file a bug with a reduction (simplest HTML where this
bug/behavior is observable) and cc me.

On Fri, Feb 15, 2013 at 3:22 AM, vineeth <nvineeth at gmail.com> wrote:

> Hi,
> Thanks for your reply. I think selectionchange isn't getting fired. I
> created a simple page with some text and some images and added this event
> handler:
> document.onselectionchange=function(){ console.log('sel changed'); }
>
> Now when I click anywhere on a text region this function is called.
> However clicking on a image isn't firing this event. I tried the above
> experiment on chrome  24.0.1312.57 m
>
> Is this a bug and should I file a bug report for this?
> If I need to add this behavior which classes should I look into?
>
> Thanks.
>
> --Vineeth
>
>
> On Fri, Feb 15, 2013 at 3:42 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>
>> We should be firing selectionchange event. It's fired in
>> FrameSelection::setSelection but our implementation of selectionchange
>> event is asynchronous.
>>
>> On Fri, Feb 15, 2013 at 2:07 AM, vineeth <nvineeth at gmail.com> wrote:
>>
>>> Hello,
>>> I have a usecase in which I need document.onselectionchange to be fired
>>> when I click on an img, the way it happens for text nodes. Can someone pls
>>> help the function/class to look into. I am currently going through
>>> EventHandler.cpp and
>>> EventHandler::updateSelectionForMouseDownDispatchingSelectStart but
>>> haven't made much progress.
>>>
>>> Thanks.
>>> --Vineeth
>>>
>>> _______________________________________________
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>>> https://lists.webkit.org/mailman/listinfo/webkit-dev
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130215/22991ef0/attachment.html>


More information about the webkit-dev mailing list