Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to enter negative numbers on iOS or Andorid #19893

Closed
4 tasks done
lesma opened this issue Feb 27, 2024 · 4 comments
Closed
4 tasks done

Unable to enter negative numbers on iOS or Andorid #19893

lesma opened this issue Feb 27, 2024 · 4 comments
Labels

Comments

@lesma
Copy link

lesma commented Feb 27, 2024

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

When using Chrome on Android, the App on Android, Safari on iOS or the App on iOS you are unable to enter negative numbers despite being able to on the desktop. I do wonder if it might be something to do with the regex validation but that is very much a guess on my part.

Interesting Samsung Internet on Android does not appear to have the issue, so I suspect that its not applying the validation on it which the others are.

Moved from iOS repo: https://github.com/home-assistant/iOS/issues/2270

On Mobile Chrome on Android
Screenshot_20240226_171943_Chrome

On Desktop Firefox on Windows 11:
Screenshot 2024-02-26 185034

Describe the behavior you expected

Be able to enter negative numbers

Steps to reproduce the issue

  1. In Chrome on Android, the App on Android, Safari on iOS or the App on iOS try and enter a negative number

What version of Home Assistant Core has the issue?

2024.2.4

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Multiple

Which operating system are you using to run this browser?

Multiple

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@karwosts
Copy link
Contributor

karwosts commented Feb 27, 2024

I don't think it's specifically an issue for all android, as my android number pad includes a - sign for these fields. Maybe just a thing with the speicific android manufacturer thing that they didn't include it in their numeric keyboard? Not sure about iOS.

I don't necessarily think it's the pattern that's the issue here, as I see that also but I have no problem entering negative numbers in a number entity in my android mobile 😕

If you click on any of these buttons is there anything there that might let you change the keyboard to something with a negative sign?

image

@lesma
Copy link
Author

lesma commented Feb 27, 2024

Something very odd certainly.

The Samsung Keyboard does not allow negative numbers in Chrome or The App but does in Samsung Internet. The SwiftKey Keyboard does allow negative numbers in Chrome and the app.

Seems to be a bit of an issue on the Samsung Keyboard https://stackoverflow.com/questions/21677695/input-type-number-not-possible-to-insert-negative-numbers-on-mobile-phone and https://stackoverflow.com/questions/72049280/how-to-solve-the-galaxy-numeric-keyboard-nightmare. Does seem very odd that it works on Samsung Internet with the Samsung Keyboard though.

I don’t actually have an iOS device to test it was one of the iOS maintainers bgoncal who confirmed it was an issue for them. Though https://forums.developer.apple.com/forums/thread/711839 and https://betterprogramming.pub/12-shades-of-keyboard-types-in-ios-a413cf93bf4f suggests its possbile to get this to work for iOS in a more robust way than with the Samsung Keyboard

@hansw96
Copy link

hansw96 commented May 1, 2024

This is indeed an issue on iPhone. Only way to get a negative number in there is to copy paste from somewhere else.

IMG_2440

It seems that on iPhone the numbersAndPunctuation keyboard needs to be used.

Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 30, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants