Closed portra400nc closed 1 year ago
Thanks! I didn't consider how this would work for tablets. I've attempted a more future-proof heuristic here:
It's not great, but until there's broader support for the VirtualKeyboard API, it seems like a reasonable approach. Let me know if there are any edge cases you find where it doesn't work (I don't have a tablet, so wasn't able to test this at all)
Adds a function that checks the user agent string to determine if the device is mobile or not. Tablet users can now insert line breaks.
This might need some improvements as I'm not sure if this works on all devices.