jquery-simulate-ext
jquery-simulate-ext copied to clipboard
eventProps not working with JQuery 1.10.2
jquery-ui.js:919: event.preventDefault(); JqueryUI 1.9/1.10
Unfortunately I get a "Uncaught TypeError: Illegal invocation" and I'm not able to downgrade...
Does anyone have a workaround already?
Edit: I extended the demo.html to use eventProps - does also not work!
Does this happen only in InternetExplorer? Because I can't reproduce it in Opera, Firefox or Chrome.
I'm not able to downgrade...
And what about upgrading? It doesn't happen with jQuery 2.1.0 so maybe it's fixed in some 1.11.x version!?
No, I tested that in Chrome (also not working in IE)
I did some more investigation on that and I found out that this works in the demo:
$('#customCombo').simulate("key-sequence", {
sequence: "|{leftarrow}This is a test!{del}",
delay: 100,
eventProps: {
jQueryTrigger: true,
simulated: true
}});
But not this:
$("#img0").draggable({
stop: function(event){
console.log(event);
}
});
$("#img0").simulate("drag-n-drop", {
dx: 71,
dy: 71,
eventProps: {
jQueryTrigger: true,
simulated: true
}
});
[...]
<div style="background-color:red;position:absolute;" id="img0">Test</div>
So it seems to only fail on drag and drop! Any ideas?
This error goes down to preventDefault
invocation in jQuery UI Mouse utility: https://github.com/jquery/jquery-ui/blob/master/ui/mouse.js#L125