5 ms·
I have a reasonably good solution for this project of mine you might find useful: https://grack.com/demos/adventure/ https://grack.com/demos/adventure/ The tr
by mmastrac 1y ago
I have a reasonably good solution for this project of mine you might find useful:
https://grack.com/demos/adventure/ 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.
- stavros 1y agoThat's promising, thank you! I'll ask the LLM to implement it.
- adelineJoOs 1y agohidden 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!
- mmastrac 1y agoOops, I worded my comment poorly -- it's not a hidden input, but rather a "CSS-visibility-hidden textbox input". Hidden inputs are useful but something completely different.
- adelineJoOs 1y agoGotcha, thank you for the clarification!