framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

TypeError: null is not an object (evaluating 'e.target.dom7EventData')

Open germancollado opened this issue 9 years ago • 6 comments

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

germancollado avatar Jun 09 '17 17:06 germancollado

Same here, only available on IOS. On Android for me the resume event works fine.

rolandrybka-circeo avatar Jun 19 '17 15:06 rolandrybka-circeo

Same here. Any progress?

kipelovets avatar Jun 25 '17 12:06 kipelovets

เมื่อ 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 .

chittattoo avatar Jun 25 '17 18:06 chittattoo

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.

elijnzaad avatar Jul 03 '17 13:07 elijnzaad

hope fixed soon

puny-d avatar Jul 20 '17 02:07 puny-d

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.

lock[bot] avatar Jun 25 '18 00:06 lock[bot]