diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-03-24 16:25:06 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-03-24 16:25:06 -0700 |
commit | 1fec3101dd42c568e17b9d8d3a32228f514625d4 (patch) | |
tree | aa7ac7eb892dff62922ac37dcff91624662a891b /tests/runner.py | |
parent | eb3f5116a5006d03c9e0f94f797b9dfd9dee3aee (diff) |
properly match SDL mousebuttons to DOM buttons
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py index 0106df5d..e6a792eb 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6413,7 +6413,7 @@ f.close() open(os.path.join(self.get_dir(), 'pre.js'), 'w').write(''' function simulateMouseEvent(x, y, button) { var event = document.createEvent("MouseEvents"); - if (button) { + if (button >= 0) { var event1 = document.createEvent("MouseEvents"); event1.initMouseEvent('mousedown', true, true, window, 1, Module['canvas'].offsetLeft + x, Module['canvas'].offsetTop + y, Module['canvas'].offsetLeft + x, Module['canvas'].offsetTop + y, |