Browser response to mouse events
Posted on 2013-01-18
I've been poking around inside the TinyMCE editor code and I notice that after I insert an image into the text area I can mousedown on the image and four handles appear around the image. I've searched all through the TinyMCE source for where these handles are added and I've come to the conclusion that TinyMCE doesn't add them. It appears that the browser sends the mousedown event to TinyMCE, TinyMCE does what it needs to do with the event and then exits, passing control back to the browser, and only then do the handles appear. So it looks like the browser is adding these handles, not TinyMCE.
First, can anyone verify that this is indeed what happens: the browser is adding the handles.
Second, browsers don't always add handles when you click an image on a page that it's loaded, so when do browsers behave this way? Does the browser have to be put into a certain mode to exhibit this behavior?
Third, when you hover over one of these handles the cursor changes to a two-head arrow, inviting you to drag that side to resize the image. Is this also being done by the browser?
Thanks for any info on these questions. And any pointers to documents that talk about what browsers are able to do in response to mouse events would be most helpful.