Tagged: TextInput Element
March 30, 2021 at 5:29 am #6781
I “fixed” this issue by removing the offending input as the error message is displayed:
.wait( newFunction('dummy', ()=>true).test.is(true) // Age .and( getTextInput("age").test.text(/^\d+$/) .failure( newText('errorage', "Bitte tragen Sie Ihr Alter ein."), getTextInput("age").text(""))) )
March 30, 2021 at 2:04 pm #6784
- This reply was modified 1 week, 6 days ago by Anna.
Thank you for the feedback and the suggestion. Which code are you referring to exactly? When I open https://farm.pcibex.net/r/SsqEZD/ and enter “AP” in the “age” textbox and try to click the button (regardless of whether I filled the other fields correctly) I get an error message, which disappears as soon as I start typing again in the textbox. If I click on the button again after typing a 2-digit number in the textbox (and with the other fields correctly filled) then the experiment proceeds.
Did you include a Key element with
callbackas suggest in this message to have the error message automatically disappear upon keypress?
JeremyMarch 30, 2021 at 2:55 pm #6786
when I open your link, enter into the age text field letters “AP”, letter-string combinations “2a”, special signs like “//” or spaces and try to click the button, then I get the error message (as intended). The error message disappears when I try to change the age but nothing happens to the input itself, i.e. AP, 2a, // or ” ” stay put despite my trying most keys on the keyboard. If it helps, I’m using Firefox version 86.0.1 (64-bit) on Fedora 32.
Either way, my workaround seems to do the job for this issue, which hopefully it’s unique to my setup.
AnnaMarch 30, 2021 at 3:51 pm #6787
Ah, I’m able to reproduce the issue if I select all the text and start typing in the expectation that it will overwrite the selected text: no (printing) character replaces the old text, which simply remains unedited (and still selected) in the input box. However, if I press the backspace key, the content is deleted as it should, and I can start typing successfully again.
I didn’t notice it before because I just wouldn’t select the text at all; instead, I would place my cursor at the end of the text, press the backspace key twice and start typing. Am I describing the same issue as yours?
JeremyMarch 30, 2021 at 4:15 pm #6788
yes, you are spot on. I tried it out now. If I press backspace I can input new text but overwriting the existing text does not work.
You must be logged in to reply to this topic.