Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

JQM 1.4.5 doesn't support jQuery 2.2.0 #8381

Open
suewonjp opened this issue Feb 14, 2016 · 16 comments
Open

JQM 1.4.5 doesn't support jQuery 2.2.0 #8381

suewonjp opened this issue Feb 14, 2016 · 16 comments

Comments

@suewonjp
Copy link

simple popup invocation doesn't work for the combination of the jquery 2.2.0 and jquery mobile 1.4.5 (both are recent versions)

Here is a very simple html file, which tries to only open a popup. It fails at least on my system.

test7.html.zip

The error message is:

TypeError: a.preventDefault is not a function. (In 'a.preventDefault()', 'a.preventDefault' is undefined)

But, other combinations work; for instance:

  • jq 1.9.1 and jqm 1.4.5
  • jq 2.2.0 and jqm 1.3.2

The bottom line is something seems wrong if both of the two are latest.

tested system:

  • Safari - Version 9.0.3 (9537.86.4.4)
  • OS X 10.9.5
@jacekkarczmarczyk
Copy link

https://github.com/jquery/jquery-mobile/blob/master/js/navigation/navigator.js#L135

                popstateEvent.originalEvent = {
                    type: "popstate",
                    state: null
                };

Then jquery.js tries to execute originalEvent.preventDefault which is not defined. Adding en empty method seems to work fine at least for this case. However I'm not sure whether this should be handled by jquery itself or should be fixed in jquery mobile.

Edit: this issue jquery/jquery#2812 seems to be related

@Gemorroj
Copy link

Not work if data-history="true" (http://api.jquerymobile.com/popup/#option-history).
Example code: http://js.do/code/84344
Problem affected in jquery version 2.2.0 and 2.2.1 (work fine in version 2.1.4).

@arschmitz
Copy link
Contributor

jQuery 2.2 was released after jQuery Mobile 1.4.5 and is not supported by it. This is fixed in the latest code which will be for 1.5.0.

@jaspermdegroot
Copy link
Contributor

Closing this ticket, based on @arschmitz his comment.

@arschmitz
Copy link
Contributor

@jaspermdegroot i'm going to open this to discuss a possible 1.4.6 just to add compatibility at this weeks meeting we can update once a decision is made.

@arschmitz arschmitz reopened this Feb 23, 2016
@Gemorroj
Copy link

@arschmitz any information about 1.4.6?

@apsdehal
Copy link
Contributor

@arschmitz What is the final stance on 1.4.6?

@arschmitz
Copy link
Contributor

We are planning a 1.4.6 once we get 1.5 out

@bassena
Copy link

bassena commented May 24, 2016

How far away are we from jQM 1.5?

@apsdehal apsdehal changed the title popup doesn't work with jquery 2.2.0 and jmq 1.4.5 JQM 1.4.5 doesn't support jQuery 2.2.0 May 25, 2016
@apsdehal
Copy link
Contributor

@bassena We are very close. We are working API docs and upgrade guide at the moment.

@bassena
Copy link

bassena commented May 25, 2016

@apsdehal Glad to hear!

@tmarplatt
Copy link

While we wait for 1.5 (or 1.4.6), is there a known workaround for this issue? Other than downgrading jQuery, that is.

@Chez
Copy link

Chez commented Aug 6, 2016

Still no news? For developers that need more than 1.4.5 offers, we are in limbo - drop jqm or wait and see, either way it could cost us dearly.

@arschmitz
Copy link
Contributor

1.5-alpha1 is complete and we are just working on the accompanying documentation. If you want to try this out you can get the git version from our CDN or use the download builder on the master branch.

@Chez
Copy link

Chez commented Aug 7, 2016

Ok, that is good news. One question, does 1.5 have right to left (rtl) ability? We use a customized version of 1.4.5 js and css files for our rtl version.

@jerroydmoore
Copy link

+1 this issue. The latest stable version of jqm should work with the latest version of jquery. Or better version pairing guidance should be given to developers, otherwise, the product appears unstable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants