]> source.dussan.org Git - jquery-ui.git/commitdiff
jquery.simulate fix for 2 pixels IE bug from mousecords
authorEduardo Lundgren <eduardolundgren@gmail.com>
Thu, 5 Jun 2008 00:32:40 +0000 (00:32 +0000)
committerEduardo Lundgren <eduardolundgren@gmail.com>
Thu, 5 Jun 2008 00:32:40 +0000 (00:32 +0000)
ui/tests/jquery.simulate.js

index 0174e5dcf9b2dcbeada8ac6682db12693c69d0be..8246521f66858a6e3f56d2fe38e94b04baea6162 100644 (file)
@@ -72,6 +72,9 @@ $.extend($.simulate.prototype, {
                } else if (document.createEventObject) {\r
                        evt = document.createEventObject();\r
                        $.extend(evt, e);\r
+                       // fix for 2 pixels bug from mousecords \r
+                       evt.pageX = options.x; evt.pageY = options.y;\r
+                       \r
                        evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;\r
                }\r
                return evt;\r