← Back to context

Comment by M4v3R

1 month ago

Browser text entry on mobile phones is notoriously hard to get right and some bugs are literally unfixable [1]. I'm a frontend developer in my day job and I struggled with this even before AI was a thing. I think you just accidentally picked one of the hardest tasks for the AI to do for you.

[1] Example: https://www.reddit.com/r/webdev/comments/xaksu6/on_ios_safar...

Huh, that's actually my exact bug. I didn't realize this was so hard, thank you.

  • I have a reasonably good solution for this project of mine you might find useful:

    https://grack.com/demos/adventure/

    The trick for me was just using a hidden input and updating the state of an in game input box. The code is ancient by today's standards but uses a reasonably simple technique to get the selection bounds of the text.

    It works with auto complete on phones and has been stable for a decade.

    • hidden input box is something I heard before from some hacker-ish old collegues - seems to be a powerful and reliable approach to store state & enable communication between components!

      2 replies →

  • https://xkcd.com/1425/

    One of the frustrating things about web dev, I find, is the staggering gulf between apparently nearly identical tasks and unpredictability of it. So often I will find myself on gwernnet asking Said Achmiz, 'this letter is a little too far left in Safari, can we fix that?' and the answer is 'yes but fixing that would require shipping our own browser in a virtual machine.' ¯\_(ツ)_/¯