diff options
author | juj <jujjyl@gmail.com> | 2014-02-21 14:49:46 +0200 |
---|---|---|
committer | juj <jujjyl@gmail.com> | 2014-02-21 14:49:46 +0200 |
commit | 3a2ab2a4255c4a09015c48c60abc7172a48b4fc6 (patch) | |
tree | 562bb1424a268d76c985837bd0bd9913474930f1 | |
parent | 13547567967dd2512bc981fa07c575dc02623e1c (diff) | |
parent | 202271e11adc88f0e6e9f1d0a92374b24af16e91 (diff) |
Merge pull request #2148 from TV4Fun/html5fixes
Fix bugs in HTML5 events when using SAFE_HEAP
-rw-r--r-- | src/library_html5.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/library_html5.js b/src/library_html5.js index fa75aced..84de0093 100644 --- a/src/library_html5.js +++ b/src/library_html5.js @@ -236,10 +236,10 @@ var LibraryJSEvents = { var handlerFunc = function(event) { var e = event || window.event; JSEvents.fillMouseEventData(JSEvents.wheelEvent, e); - {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaX, 'e.deltaX', 'double') }}} - {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, 'e.deltaY', 'double') }}} - {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, 'e.deltaZ', 'double') }}} - {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, 'e.deltaMode', 'i32') }}} + {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaX, 'e.deltaX', 'double') }}}; + {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaY, 'e.deltaY', 'double') }}}; + {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaZ, 'e.deltaZ', 'double') }}}; + {{{ makeSetValue('JSEvents.wheelEvent', C_STRUCTS.EmscriptenWheelEvent.deltaMode, 'e.deltaMode', 'i32') }}}; var shouldCancel = Runtime.dynCall('iiii', callbackfunc, [eventTypeId, JSEvents.wheelEvent, userData]); if (shouldCancel) { e.preventDefault(); @@ -772,7 +772,8 @@ var LibraryJSEvents = { var confirmationMessage = Runtime.dynCall('iiii', callbackfunc, [eventTypeId, 0, userData]); - confirmationMessage = Pointer_stringify(confirmationMessage); + if (confirmationMessage) + confirmationMessage = Pointer_stringify(confirmationMessage); if (confirmationMessage) { e.preventDefault(); e.returnValue = confirmationMessage; |