On older versions of Safari, I encounter some errors with my liveview.
[Error] TypeError: n.entries is not a function. (In ‘n.entries()’, ‘n.entries’ is undefined)
StackTrace:
O (phoenix_live_view.js:375)
value (phoenix_live_view.js:1438)
value (phoenix_live_view.js:1481:135)
value (phoenix_live_view.js:576)
(anonymous function) (phoenix_live_view.js:791)
(anonymous function) (phoenix_live_view.js:828)
click
trigger (jquery.js:8510)
(anonymous function) (jquery.js:8549)
each (jquery.js:367)
listenToBoundsChange (search_map.js:161)
j (js:194:300)
trigger (js:191:159)
b (map.js:31:139)
My code at search_map.js:161 is $('#myForm button[type=submit]').click();
I do not receive any data from the server (which I was expected after my form submit)
[Error] WebSocket connection to 'ws://localhost:4000/phoenix/live_reload/socket/websocket?vsn=2.0.0' failed: WebSocket is closed due to suspension.
[Error] WebSocket connection to 'ws://localhost:4000/live/websocket?vsn=2.0.0' failed: WebSocket is closed due to suspension.
Sometimes I get both (1) and (2). These two are on the same liveview.
On another liveview, I get the following error every time I change something in my form (inputs, radio buttons, checkboxes)
[Error] TypeError: new FormData(n.form).getAll is not a function. (In 'new FormData(n.form).getAll(n.name)', 'new FormData(n.form).getAll' is undefined)
(anonymous function) (phoenix_live_view.js:803)
(anonymous function) (phoenix_live_view.js:828)
Do these errors ring a bell for you guys? Can you please point a direction to figure it out what I’m doing wrong on my side?
Every thing works perfect on Chrome, Firefox, Opera
By the way, great framework. You’ve done a very good job. Thanks.
In the developer console in the browser when you click do you see the submit happen in the network tab, are there any js errors as you using js to click and if there are errors nothing is going to work? Are you getting a success 200? If your not even sending, is the button in a form? As submit requires a form and matching open and closes for all dom elements. Alternatively create a function on the click handler, event.preventDefault() to stop the default submit action and ajax post it. Also try and target the form element in the console and try and call .submit() directly on the form and .click on the button, you can call the js fn directly from the console.
I’ve tried some of them with the following output:
no network activity even if i manually submit the form
I’ve disabled the JS click from my code; Refreshed the page; No error in the console. I manually call the jQuery click.
The error (1) appears: TypeError: n.entries is not a function. (In ‘n.entries()’, ‘n.entries’ is undefined)
The button gets disabled with the following extra attributes: data-phx-disabled="false" disabled
The form receives the following attribute: class="phx-loading"
That I’m trying to do here is to populate with js some hidden fields of the form, and submit it via liveview to be processed on the server.
My client pointed that on iPad 2 (iOS 9.3.5 - release date August 2016) is still not working.
Is there a browser version support limit? @chrismccord is there any way I can fix this or should I mention my client that we do not support older versions of safari?
I have the same iOS version like on this topic, but it seems that there are still some errors.
I’ll try to debug myself on a similar device hoping I’ll come back with some errors that might the investigation.