TypeError: null is not an object (evaluating 'e.target.dom7EventData')
This is a (multiple allowed):
-
[x] bug
-
[ ] enhancement
-
[ ] feature-discussion (RFC)
-
Framework7 Version: 1.6.4
-
Platform and Target: Cordova / iOS
What you did
Bring app from background to foreground
Actual Behavior
Bringing app to foreground: TypeError: null is not an object (evaluating 'e.target.dom7EventData')
Does not occur in version 1.6.0
https://github.com/nolimits4web/Framework7/blob/master/src/js/dom7/dom7.js#L1034
Same here, only available on IOS. On Android for me the resume event works fine.
Same here. Any progress?
เมื่อ 10 มิ.ย. 2017 0:16 "Germán Collado Jara" [email protected] เขียนว่า:
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
Framework7 Version: 1.6.4
Platform and Target: Cordova / iOS
What you did
Bring app from background to foreground Actual Behavior
Bringing app to foreground: TypeError: null is not an object (evaluating 'e.target.dom7EventData')
Does not occur in version 1.6.0
https://github.com/nolimits4web/Framework7/blob/ master/src/js/dom7/dom7.js#L1034
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nolimits4web/Framework7/issues/1636, or mute the thread https://github.com/notifications/unsubscribe-auth/AT6XhZj8LBtF2YvhY-BLosqlXKy8v60Wks5sCX4DgaJpZM4N1nmg .
This problem occurs in handleEvent on line 1048. It happens when the app has been switched to background and then to foreground again. This fires a "resume" event, which does not have a specific target, currentTarget or srcElement attached to it. As e.target is null in this case, the statement on line 1048 (v 1.6.4) fails.
If it really bothers you, you can apply a very dirty fix to the function at line 1047:
function handleEvent(e) {
try {
var eventData = e.target.dom7EventData || [];
eventData.unshift(e);
listener.apply(this, eventData);
}
catch(handleEventError) {
// Just ignore
}
}
In my case this does the trick, but it is certainly not a permanent candidate. By the way: thanks for your awesome framework! I really enjoy using it.
hope fixed soon
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.