Skip to content
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

Upgrading to v5.1.0 jqm es6 Object.assign(..) #473

Open
gregh3269 opened this issue May 26, 2019 · 9 comments
Open

Upgrading to v5.1.0 jqm es6 Object.assign(..) #473

gregh3269 opened this issue May 26, 2019 · 9 comments
Labels
BUG-Regression Things that used to work that do not now

Comments

@gregh3269
Copy link

Loading datebox for jqm crashes the page on an older webkit phone, there is some es6 Object.assign(..) code.

I did some testing and the suggested polyfill

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill

works.
Should fail gracefully. ...Alas, the work of js is moving to fast (or lack of foresight) for reality.

@jtsage
Copy link
Owner

jtsage commented May 30, 2019

Gross. I will drop the polyfill in the jqm build - because chances are the other builds are also broken, but I bet those frameworks aren't going to work either without a third party shim on devices that are that old.

@jtsage jtsage added the BUG-Regression Things that used to work that do not now label May 30, 2019
@jtsage jtsage added this to the v5.1.3 milestone May 30, 2019
@jtsage jtsage closed this as completed May 30, 2019
@gregh3269
Copy link
Author

Down loaded v5.1.3 and should the fix be inside jtsage-datebox.min.js & jtsage-datebox.js?

@jtsage
Copy link
Owner

jtsage commented Jun 7, 2019

Yes, yes it should. But it's not, due to how the build process works. It'd be there if node didn't have Object.assign. I'll look at this today

@jtsage jtsage reopened this Jun 7, 2019
@jtsage jtsage modified the milestones: v5.1.3, v5.1.4 Jun 7, 2019
@jtsage
Copy link
Owner

jtsage commented Jun 7, 2019

So, as part of this, I'm adding a folder, [root]/src/js/polyfill - right now it's only used for jQM, but it could be expanded pretty easily. Pretty much, drop a .js file in that folder and it will be included in the jQM build. The Object.assign bit is in there - I don't believe I use any other "modern" javascript bits - I actually hesitated over this one for a bit, as most of the devices that don't have it have gone out of service - or so I thought anyway :)

I'm gonna push to the main server and build the -latest branch (http://cdn.jtsage.com/jtsage-datebox/latest/) if you want to verify this works before I tag the release.

@gregh3269
Copy link
Author

Build seems OK, thanks.

@jtsage
Copy link
Owner

jtsage commented Jun 10, 2019

Great, I'll get this tagged and pushed to v5.1.4 sometime today. Thanks!

EDIT: tagged, pushed, builder updated.

@gregh3269
Copy link
Author

I have tried 5.1.4 and the polyfill is still missing.

looking here http://cdn.jtsage.com/jtsage-datebox/latest/jtsage-datebox.jqm.js I can see it.

Also, every time datebox fails it crashes the js on the page (blocking the page totally), could a try catch block be used somewhere to stop this? or maybe initialise when the button is clicked which would make page load faster?

@jtsage jtsage removed this from the v5.1.4 milestone Jul 15, 2019
@gregh3269
Copy link
Author

Using the download builder v5.3.3 for jqm the polyfill is still missing. Although it is present in the cdn link above. Otherwise it works great. Thanks.

@jtsage
Copy link
Owner

jtsage commented Jan 21, 2020

Oh, gross - because I re-wrote the build script for the cdn builds, but never touched the download builder. Cool, I'll get this done as soon as I have a few minutes to sit with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG-Regression Things that used to work that do not now
Projects
None yet
Development

No branches or pull requests

2 participants