Question

When we make a element content editable and we do mousedown in that element then mousedown and mousemove(when moved) of that element is fired. But if we move our mouse to other element(keeping button pressed) then mouseove of other elements are not fired.

Check jsFiddle at "http://jsfiddle.net/yvB77/"

In this do mousedown at editable element and then move mouse to non-editable element and check that text in 3rd p is not updated as mousemove of other element is not fired.

<p class="editable" contenteditable="true">Hello I am editable</p>
<p class="non-editable"> I am non-editable</p>

<p class="text"></p>


var ismousedown=false;
$('p').mousedown(function(e){
    ismousedown=true;
});
$('p').mousemove(function(e){
    if(ismousedown){ 
        $('.text').html($(this).html());
    }
});
$('p').mouseup(function(e){
    ismousedown=false;

});

I have added the question on Microsoft IE forum and they are able to replicate the bug but no fix or workaround has been suggested "https://connect.microsoft.com/IE/feedback/details/834296/content-editable-and-mouseevents"

Was it helpful?

Solution

A Known limitation

https://connect.microsoft.com/IE/feedback/details/834296/content-editable-and-mouseevents

Not able to find any fix or workadound for this

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top