Closed tbtalbottjr closed 5 years ago
I see the console.log calls what do they show in the console?
Typically if an element with the id does not exist then $()
will return null
and $().getValue()
will not be a function.
Also I think if the element you are attempting to run .getValue()
on is not a normal form element, or not a descendent of a <form>
element the .getValue()
method will not exist on the element.
Thanks for the reply
The log shows the <select>
element that we are expecting. I thought the same thing.
Right now we are going down the path of suspecting some other JS library conflict since an isolated test case seems to be working. I will close if we are able to determine why it is happening and why only on mobile and if it isn't a problem with 1.7.1+.
We found that the problem was being caused by our own JS that was defining:
var Node = {
...
}
This apparently conflicts with code in 1.7.1+, but only in mobile browsers. :/
Renaming this (or namespacing it) solves the problem. I can close this unless you feel it is worth investigating whether it makes sense for Node to be left vulnerable in this case.
Thanks.
I'm guessing that your Node
is in the global space - so with the DOM rewrite in 1.7.1 Prototype uses a variable Node
in the global space as well as a general definition of a DOM node.
I'll open a specific issue that references this issue so you can close it.
Yes, that is correct.
Closing.
We recently moved an old codebase from Prototype 1.7 to 1.7.1 because we are about to embark on an iterative rewrite using vue.js. Moving to 1.7.1 fixed some incompatibility issues that I don't recall off the top of my head. But we noticed that since moving to 1.7.1 we are getting the following error when used in mobile Safari or mobile Chrome:
where application.js has:
This error also occurs using 1.7.2 and 1.7.3. The error does not occur in either desktop browser.
We are reverting to 1.7 for now until we can figure out this problem and will try to create a simplified repro case when I get a chance, but was wondering if this is a known issue. I can't find anything on it, so I wonder if there is a different incompatibility with another JS library we are using.