[
https://issues.apache.org/jira/browse/CB-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wouter updated CB-683:
----------------------
Description:
The pause and resume events do not pass an event object to the event handlers.
This event parameter is not optional according to W3C DOM specification
(http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration) and
expected by for instance jquery.
was:
The pause and resume events do not pass an event object to the event handlers.
This event parameter is not optional according to W3C DOM specification
(http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration) and
expected by for instance jquery.
Using jquery to bind the event:
$(document).bind('pause', handler);
will cause an exception (on Android) since jquery will internally request
properties of the event parameter.
On iOS there will be no exception since iOS supplies a window.event property
which jQuery uses when no event parameter is present.
A workaround is not to use jquery but simply:
document.addEventListener('pause', handler, false);
The event handler should not be expecting an event parameter in this case, for
both Android and iOS.
Summary: Pause and resume events are fired without event parameter
(was: Pause and resume events on Android are fired without event parameter)
Using jquery to bind the event:
$(document).bind('pause', handler);
will cause an exception on Android since jquery will internally request
properties of the event parameter.
On iOS there will be no exception since iOS supplies a window.event property
which jQuery uses when no event parameter is present.
A workaround is not to use jquery but simply:
document.addEventListener('pause', handler, false);
The event handler should not be expecting an event parameter in this case, for
both Android and iOS.
> Pause and resume events are fired without event parameter
> ---------------------------------------------------------
>
> Key: CB-683
> URL: https://issues.apache.org/jira/browse/CB-683
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, iOS
> Affects Versions: 1.6.1, 1.7.0
> Environment: Samsung Galaxy S plus (GT-I9001), HTC Desire
> (htc_bravo), iPhone
> Reporter: Wouter
> Assignee: Joe Bowser
> Attachments: index.html
>
>
> The pause and resume events do not pass an event object to the event
> handlers. This event parameter is not optional according to W3C DOM
> specification
> (http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration) and
> expected by for instance jquery.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira