<abu[m]>
A customer found a strange bug (?) in PicoLisp GUI: If an input field is of class +DbHint, you cannot enter a "&" character (unless it is the very first character).
<abu[m]>
Seems to depend on the browser
<abu[m]>
No problem with a browser on Android (I tested with PilBox and Chrome), but any browser on Linux and Windows it seems.
<abu[m]>
Any idea anyone?
<frostbyte_>
I'd be happy to test it in Firefox on Linux if you can provide me some code or a URL.
<frostbyte_>
I'm too new to knock up anything quickly myself.
<abu[m]>
If you type something in "Customers", it pops up proposals. This is the effecct of the +DbHint prefix class
<abu[m]>
I mean the "Customer" search field
<abu[m]>
or "City"
<frostbyte_>
Of course I don't get any matches but there are no errors.
<frostbyte_>
"this & that"
<abu[m]>
ok, so you can enter a "&"?
<frostbyte_>
Appears so.
<abu[m]>
Which browser and OS?
<frostbyte_>
There's certainly no problem simply entering the text into the field. What gets sent and so on to the server, I can't say.
<frostbyte_>
Firefox on Linux
<abu[m]>
I see problems only on the client side
<abu[m]>
Typing "&" simply is not echoed
<abu[m]>
Works in Android browsers
<abu[m]>
hmm, so strange
<frostbyte_>
Server side is fine too because the generated source: "<input type="text" name="*Gui:3" value="this & that" size="20" class="field" id="i2-3"/>"
<abu[m]>
yeah
<frostbyte_>
Do you know which browser the customer is using?
<abu[m]>
I tried Firefox on two different Linux machines, and could not enter &
<abu[m]>
The customer has Edge and Chrome
<frostbyte_>
Neither are working?
<abu[m]>
right
<abu[m]>
all four
<frostbyte_>
I believe my wife has both on her office computer. I can ask her to try tomorrow.
<frostbyte_>
To me, it sounds like this a symptom or perception of a different problem.
<abu[m]>
I suspect something in @lib/form.js is wrong
<frostbyte_>
Can the customer test with JS disabled?
<abu[m]>
"normal" search fields (e.g. "Zip") work. only fields popping up a hit list don't
<abu[m]>
I think then it would work
<frostbyte_>
Oh, I see.
<frostbyte_>
Initially, I tried without JS because that's my default, but it worked both ways.
<abu[m]>
And then with JS?
<frostbyte_>
No problem.
<abu[m]>
Same as here on Androd. All browsers seem to work
<frostbyte_>
in formKey there's: if ((Item >= 0 && Key == 13) || Key == 38 || Key == 40)
<frostbyte_>
38 being &
<frostbyte_>
I believe.
<abu[m]>
right
<abu[m]>
: (char "&")
<abu[m]>
-> 38
<abu[m]>
hmm, I don't remember
<abu[m]>
Perhaps 40 has the same problem"
<abu[m]>
The point is that I don't remember why 38 is checked here ☺☺
<abu[m]>
keyCode 38 seems to be the UP key
<frostbyte_>
Oh.
<abu[m]>
keyCode != key value
<frostbyte_>
So, what are 13 and 40?
<abu[m]>
13 is RETURN
<frostbyte_>
Figures.
<abu[m]>
40 is supposed to be DOWN
<abu[m]>
Something is mixed up with key vylues and key codes
<frostbyte_>
which makes this line look a little suspicious: if (event.charCode || event.keyCode == 8)
<frostbyte_>
What are 8 and 27?
<abu[m]>
8 is backspace, and 27 is ESC
<abu[m]>
It seems some browsers deliver different values in char codes and key codes
<frostbyte_>
What is 9?
<abu[m]>
this is TAB (^I)
rob_w has quit [Read error: Connection reset by peer]