IPad iOS 9.3.5 - DataTables 2.X does not initialize

IPad iOS 9.3.5 - DataTables 2.X does not initialize

ds00424ds00424 Posts: 10Questions: 4Answers: 0
edited September 11 in DataTables 2

Hi there.
I find when using an iPad that has iOS 9.3.5 with DataTables 2.x.x using Safari browser -- DataTables does not initialize. I know that's an old iPad but there are still some old ones out there :-) I can see this issue using the iPad and going to the datatables.net examples. Even the zero configuration example does not init the datatable. I have tried my code with DT2.1.5 as well as DT2.0.0. If I use DataTables 1.13.11 or prior all is good. Of course, I'd prefer to use the newer V2.x.x

I don't have a BrowserStack account so have not tried that way. I do have an old iPad that I don't think can be upgraded beyond 9.3.5. In fact when I go to Settings/General/Software Update - it says it has the latest.

LMK if there's more info I can provide or tests I can perform.
I'm not an Apple person so my debugging ability on an iPad is limited to none.

Thanks.
David

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,982Questions: 1Answers: 10,364 Site admin

    Hi David,

    I think it is the use of Array.prototype.flat() that is the issue there - thanks for flagging it up.

    I've committed a change to address this, and it will be in the next release. The nightly will have the fix soon and I'll try that on BrowserStack.

    Allan

  • ds00424ds00424 Posts: 10Questions: 4Answers: 0

    Hi Allan.
    Thanks for the quick response and the find and fix!
    I have a small test file that I'll try with the nightly when the fix is there.

    David

  • allanallan Posts: 62,982Questions: 1Answers: 10,364 Site admin

    Nightly is update to date with the change (keep the query string, to make sure you don't get an old cached version from CloudFlare's edge servers).

    Allan

  • ds00424ds00424 Posts: 10Questions: 4Answers: 0

    Unfortunately, with the nightly the DataTable still does not initialize on the iOS9.3.5 iPad.
    For the moment, I've put a workaround in my codebase to detect the iOS9.3.5 and load 1.x.x

    I ran into the following: 1.13.4 does not initialize on iOS9.3.5, but 1.13.5 and all up thru 1.13.11 does. Not sure if that's the same issue as in the 2.x.x code, but maybe that helps. BTW, 2.0.0 also does not init.

    Again I have no debugging capability on the ipad so can't provide any JS error info. From what I read, i need to connect it to a mac <sigh>. I'll see if I can get my hands on a mac, and then figure out how to debug the ipad safari.

    FYI, I have a simple test case very similar to the default at live.datatables.net. But I can also go to live.datatables.net and see that the default table does not initialize.

    David

  • allanallan Posts: 62,982Questions: 1Answers: 10,364 Site admin

    Hi David,

    Unfortunately I don't have an iPad that old to try it on and the BrowserStack iOS 9.3 browser is just a simulator - I can only tell it to load a specific page. I can't view a console or error message. I fired up their El Capitan browser with Safari 9.1 though and that does allow me to interact with it. It was complaining about a few of let variables that had slipped in.

    I've committed a change to address that.

    The nightly will update again soon and the cycle will continue... Hopefully this is the last, but we'll find out!

    Allan

  • ds00424ds00424 Posts: 10Questions: 4Answers: 0

    Hi Allan.
    I tried the nightly at 4:45p Eastern Time (8:45p GMT). So I assume it was built. (Would be nice to have the build date/time someplace.) I changed the query param to 2024-09-13. Still no luck. As I said I have a work around in our code to load 1.x.x if an iOS < 10 connects. I might have to expand that to "<12" but we'll see.

    I'll get my hands on a mac (My wife has an old macbook air that hopefully I can find) and then I'll figure out how to get some debug info for us.

    David

  • allanallan Posts: 62,982Questions: 1Answers: 10,364 Site admin

    Now it's giving an error on:

    Object.defineProperty(detect, "name", {value: name});
    

    It says "Cannot set the value of a readonly property".

    That happens when setting up the type detection - I assign the name of the data type as the function name so it can then be referred to at a later time. Apparently old Safari doesn't like that... That's going to be a pig to fix. I'll take a look into it at the start of the week.

    Allan

  • allanallan Posts: 62,982Questions: 1Answers: 10,364 Site admin
    Answer ✓

    I've just made three commits (1, 2, 3) to address limitations in Safari 9.

    DataTables will now correctly initialise in Safari 9. I haven't tested any of the extensions yet.

    Allan

  • ds00424ds00424 Posts: 10Questions: 4Answers: 0

    Very nice! Thank you.
    My simple DataTables test code does indeed load on an iOS9.3.5 ipad.
    I'll let you know if I run into anything in the extensions (we use).

    Thanks again for the investigation and fixes for an old OS/browser.

    David

  • allanallan Posts: 62,982Questions: 1Answers: 10,364 Site admin

    Thanks for confirming. I'll probably tag and release it on Friday.

    Allan

Sign In or Register to comment.