Open lolodomo opened 1 year ago
I just tested this on the release version of OH in Chrome and Firefox. It worked for me. Any further hint on when it goes wrong?
Here are my two items:
Number TestNumber "Test number [%.2f]" (GTest1)
Number:Length TestNumberDim1 "Test number dim 1 [%.1f cm]" (GTest1) { unit="mm" }
and my sitemap:
sitemap test4 label="Tests"
{
Frame label="Input number hint number" {
Input item=TestNumber inputHint="number"
Input item=TestNumberDim1 label="Test number dim 1 [%f mm]" inputHint="number"
Input item=TestNumberDim1 label="Test number dim 1 [%f cm]" inputHint="number"
}
}
I first entered some values:
Now look at what I fill in the field for example:
Then if I push the Enter key or click outside the field, the old value is restored:
Same thing with the other number.
I just tested in Chrome and Edge and it is working. The bug is only with Firefox.
I just tested in Chrome and Edge and it is working. The bug is only with Firefox.
That’s what I expected, and not easy to solve. Edge and Chrome use the same engine. I noticed a difference with number validation in Firefox before. Therefore I was surprised it worked for me also in Firefox last week. I need to look for the references again, but there were some Firefox development issues on this before, largely classified as won’t fix, or where the fix did not solve everything.
I think we should label this as won’t fix for the underlying dependency. Otherwise we need to completely drop use of native browser number functionality and base everything on text.
I think we should label this as won’t fix for the underlying dependency.
Done but I would appreciate you check that is not a bug in our code.
@lolodomo I tried with exactly your example in Firefox. It does work for me. I tried various combinations of language settings in Firefox as well. It all worked. The only time I could make it fail is when I put a space in front of the +, but the + worked. I am on a Firefox Extended Support Release on Windows (102.13.0esr (32-bit)). Could that have something to do with it?
My Firefox version: 115.0.3 (64 bits)
I am not able to test with the non esr version of Firefox. I am unable to reproduce, so can't do much at the moment.
Which UI are you reporting an issue for?
The problem
For a number item, an input widget with hint number, you cannot fill a value containing a leading + like for example "+12". "-12" and "12" are of course accepted. It was tested in Firefox.
Expected behavior
The leading + should be accepted.