New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery Mobile pages crash in mobile Safari when tapping away from select (iOS 8) #7685

Closed
ptrln opened this Issue Sep 18, 2014 · 27 comments

Comments

@ptrln

ptrln commented Sep 18, 2014

Issue description

After updating to iOS 8, every time you tap away from a select, the page crashes, and this error is displayed: A problem has occurred with this webpage so it was reloaded.

Test page (see below)

http://demos.jquerymobile.com/1.4.4/selectmenu/

Steps to reproduce

  1. Click on the select
  2. Select an option (other than the one already selected)
  3. Press the angle right icon to "tap" to the next select.
  4. Page crashes

Expected outcome

Go to the next input.

Actual outcome

Page crashes and reloads.

Platforms/browsers (including version) and devices tested

Mobile Safari on iOS 8 on iPhone 5, iOS 8 on iPhone 5s. Works in Chrome for iPhone.

jQuery Mobile and jQuery core version used

jQM: 1.4.4
jQuery: 1.10.2

img_2579

@ptrln

This comment has been minimized.

Show comment
Hide comment
@ptrln

ptrln Sep 18, 2014

Also affects jQM 1.3.2.

Older versions seem to be fine.

ptrln commented Sep 18, 2014

Also affects jQM 1.3.2.

Older versions seem to be fine.

@ptrln ptrln changed the title from jQuery Mobile pages crash in mobile Safari when tapping away from select to jQuery Mobile pages crash in mobile Safari when tapping away from select (iOS 8) Sep 18, 2014

@slavap

This comment has been minimized.

Show comment
Hide comment
@slavap

slavap Sep 19, 2014

I'm able to reproduce this bug on iPod Touch, iOS8, Safari. Looks like it's not jqm bug, but rather iOS8 problem. It's not always reproducible, for example starts working after using Done in the same dialog.

slavap commented Sep 19, 2014

I'm able to reproduce this bug on iPod Touch, iOS8, Safari. Looks like it's not jqm bug, but rather iOS8 problem. It's not always reproducible, for example starts working after using Done in the same dialog.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Sep 19, 2014

Member

I can confirm this issue and will look into what we can do here this is a pretty major issue!

Member

arschmitz commented Sep 19, 2014

I can confirm this issue and will look into what we can do here this is a pretty major issue!

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Sep 20, 2014

Member

Is this a duplicate of #7216?

Member

jaspermdegroot commented Sep 20, 2014

Is this a duplicate of #7216?

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Sep 20, 2014

Member

No its only iOS8 its not multi-select and its not when you select its only if you try to jump to the next input with the soft keyboard shortcut.

Member

arschmitz commented Sep 20, 2014

No its only iOS8 its not multi-select and its not when you select its only if you try to jump to the next input with the soft keyboard shortcut.

@jaspermdegroot jaspermdegroot modified the milestones: 1.4.5, 1.5.0 Sep 20, 2014

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Sep 24, 2014

Contributor

Thanks to a colleague with an iOS8 device, I was able to find the root cause of the problem. If you comment the blur() in the change event handler it no longer crashes.

Contributor

gabrielschulhof commented Sep 24, 2014

Thanks to a colleague with an iOS8 device, I was able to find the root cause of the problem. If you comment the blur() in the change event handler it no longer crashes.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Sep 24, 2014

Contributor

A quick git blame reveals that we added the blur in order to fix #5514.

Contributor

gabrielschulhof commented Sep 24, 2014

A quick git blame reveals that we added the blur in order to fix #5514.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Sep 24, 2014

Contributor

It also breaks with just plain JS: http://jsbin.com/IFolanOW/598/

Contributor

gabrielschulhof commented Sep 24, 2014

It also breaks with just plain JS: http://jsbin.com/IFolanOW/598/

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Sep 24, 2014

Contributor

A possible workaround is to unwind the stack and then blur: http://jsbin.com/IFolanOW/599/, however, we need to check whether that re-introduces #5514.

Contributor

gabrielschulhof commented Sep 24, 2014

A possible workaround is to unwind the stack and then blur: http://jsbin.com/IFolanOW/599/, however, we need to check whether that re-introduces #5514.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Sep 24, 2014

Contributor

Well, actually, after reading #5514 and #6028, it sounds like we need a different solution to #5514.

Contributor

gabrielschulhof commented Sep 24, 2014

Well, actually, after reading #5514 and #6028, it sounds like we need a different solution to #5514.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Oct 10, 2014

Member

This was fixed by ios 8.0.2 update closing as fixed

Member

arschmitz commented Oct 10, 2014

This was fixed by ios 8.0.2 update closing as fixed

@arschmitz arschmitz closed this Oct 10, 2014

@ndrake

This comment has been minimized.

Show comment
Hide comment
@ndrake

ndrake Oct 10, 2014

I'm still able to reproduce this issue with iOS 8.0.2 following the reproduction steps in the initial bug report.

ndrake commented Oct 10, 2014

I'm still able to reproduce this issue with iOS 8.0.2 following the reproduction steps in the initial bug report.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Oct 10, 2014

Member

@ndrake ah shoot your right i missed the step of selecting another option. So much for hoping apple fixed this...

Member

arschmitz commented Oct 10, 2014

@ndrake ah shoot your right i missed the step of selecting another option. So much for hoping apple fixed this...

@arschmitz arschmitz reopened this Oct 10, 2014

@jaredcacurak

This comment has been minimized.

Show comment
Hide comment
@jaredcacurak

jaredcacurak Oct 20, 2014

Following the reproduction steps in the initial bug report I'm able to reproduce this issue using iOS 8.1.

Following the reproduction steps in the initial bug report I'm able to reproduce this issue using iOS 8.1.

@silva96

This comment has been minimized.

Show comment
Hide comment
@silva96

silva96 Oct 22, 2014

On 8.1

The problem for us is occurring on a web app with meta "apple-mobile-web-app-capable", when launching the app from the home screen the browser interface isn't showed (normal behaviour). clicking around a few times the select and the screen makes safari crash. This doesn't happen inside a normal safari window (only fullscreen windows made it crash).

One more fact is that, this isn't probably a problem of jquerymobile, since we disabled the jquerymobile behaviour on selects (via data-role="none") and used native html5 select and still have the same issue.

Probably I should post something on safario for iOs developers forum, but I cant find where is that.

UPDATE: please try to reproduce this:
enter http://greenti.cl/test.html with safari in iOS 8, save it to home screen. Enter via icon in homescreen, mess around with any of the selects. Crashes?

silva96 commented Oct 22, 2014

On 8.1

The problem for us is occurring on a web app with meta "apple-mobile-web-app-capable", when launching the app from the home screen the browser interface isn't showed (normal behaviour). clicking around a few times the select and the screen makes safari crash. This doesn't happen inside a normal safari window (only fullscreen windows made it crash).

One more fact is that, this isn't probably a problem of jquerymobile, since we disabled the jquerymobile behaviour on selects (via data-role="none") and used native html5 select and still have the same issue.

Probably I should post something on safario for iOs developers forum, but I cant find where is that.

UPDATE: please try to reproduce this:
enter http://greenti.cl/test.html with safari in iOS 8, save it to home screen. Enter via icon in homescreen, mess around with any of the selects. Crashes?

@sstadtl

This comment has been minimized.

Show comment
Hide comment
@sstadtl

sstadtl Jan 15, 2015

This Bug still haunts me.
Using http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js

If i edit the source and change the following it stops crashing, but i have no clue what i am breaking :(

if ( !!options.nativeMenu ) {
  // self._delay( function() {
  // self.select.blur();
  // });
}

(Using iPhone 6 with Firmware 8.1.2)

sstadtl commented Jan 15, 2015

This Bug still haunts me.
Using http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js

If i edit the source and change the following it stops crashing, but i have no clue what i am breaking :(

if ( !!options.nativeMenu ) {
  // self._delay( function() {
  // self.select.blur();
  // });
}

(Using iPhone 6 with Firmware 8.1.2)

@rascopeeko

This comment has been minimized.

Show comment
Hide comment
@rascopeeko

rascopeeko Feb 20, 2015

I can confirm there are problems with iPad / iOS 8.1.3, using the test page provided http://greenti.cl/test.html (thanks @silva96). However, as that test page is basic HTML5 only, this is definitely a core Safari issue and nothing to do with jQuery mobile, or even javascript for that matter.

I'm posting this here as I'm sure others will find this issue as I did. I have submitted a bug report to Apple, as I'm sure others have. Anyone reading this, if you have time please do the same!

I can confirm there are problems with iPad / iOS 8.1.3, using the test page provided http://greenti.cl/test.html (thanks @silva96). However, as that test page is basic HTML5 only, this is definitely a core Safari issue and nothing to do with jQuery mobile, or even javascript for that matter.

I'm posting this here as I'm sure others will find this issue as I did. I have submitted a bug report to Apple, as I'm sure others have. Anyone reading this, if you have time please do the same!

@silva96

This comment has been minimized.

Show comment
Hide comment
@silva96

silva96 Feb 20, 2015

I already posted in bug report from Apple, they say I had to post the
debug log but I haven't.

But this is a native bug, nothing to do with jquery mobile, so here is my
stackoverflow question

http://stackoverflow.com/questions/26517672/ios8-safari-standalone-web-app-crash-on-click-select

silva96 commented Feb 20, 2015

I already posted in bug report from Apple, they say I had to post the
debug log but I haven't.

But this is a native bug, nothing to do with jquery mobile, so here is my
stackoverflow question

http://stackoverflow.com/questions/26517672/ios8-safari-standalone-web-app-crash-on-click-select

@DibranMulder

This comment has been minimized.

Show comment
Hide comment
@DibranMulder

DibranMulder Mar 31, 2015

I can confirm that this issue still exists in iOS 8.2. I don't think its a JQM bug, rather a Safari bug.

The log shows the following error: : *** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<UIPopoverPresentationController: 0x146de44f0>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'

I can confirm that this issue still exists in iOS 8.2. I don't think its a JQM bug, rather a Safari bug.

The log shows the following error: : *** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<UIPopoverPresentationController: 0x146de44f0>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 15, 2015

I cannot replicate this issue on iOS 8.3 - I believe it is fixed now.

ghost commented Apr 15, 2015

I cannot replicate this issue on iOS 8.3 - I believe it is fixed now.

@DibranMulder

This comment has been minimized.

Show comment
Hide comment
@DibranMulder

DibranMulder Apr 28, 2015

Unfortunately I can still reproduce this bug on iOS 8.3, its definitely not fixed. Tested it on an iPad Mini. Try spamming the combo box with your finger.

Unfortunately I can still reproduce this bug on iOS 8.3, its definitely not fixed. Tested it on an iPad Mini. Try spamming the combo box with your finger.

@hamdan-mahran

This comment has been minimized.

Show comment
Hide comment

The issue is fixed with new jquery 1.11.3
Please read this article http://blog.jquery.com/2014/12/18/jquery-1-11-2-and-2-1-3-released-safari-fail-safe-edition/

@bmcnamar

This comment has been minimized.

Show comment
Hide comment
@bmcnamar

bmcnamar Jul 22, 2015

It's not crashing for me on iOS 8.4

It's not crashing for me on iOS 8.4

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jul 22, 2015

Member

@bmcnamar are you using latest jquery this was fixed in core

Member

arschmitz commented Jul 22, 2015

@bmcnamar are you using latest jquery this was fixed in core

@bmcnamar

This comment has been minimized.

Show comment
Hide comment
@bmcnamar

bmcnamar Jul 22, 2015

I went to this page: http://demos.jquerymobile.com/1.4.4/selectmenu/ (the one posted above)
on iPhone 5s running iOS 8.4

I went to this page: http://demos.jquerymobile.com/1.4.4/selectmenu/ (the one posted above)
on iPhone 5s running iOS 8.4

@olivalcf

This comment has been minimized.

Show comment
Hide comment
@olivalcf

olivalcf Jul 24, 2015

still having some issues .. Do anyone know how to fix this?

still having some issues .. Do anyone know how to fix this?

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jul 30, 2015

Member

@bmcnamar @olivalcf that page will not work this is only fixed with jQuery core 1.11.4

Member

arschmitz commented Jul 30, 2015

@bmcnamar @olivalcf that page will not work this is only fixed with jQuery core 1.11.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment