Something like this:
var result = [];
body = document.body;
sel = window.getSelection(); range = document.createRange(); range.selectNodeContents(body); sel.removeAllRanges(); sel.addRange(range);
selString = sel.toString();
// Call completion to finish completion(selString);
It was pretty hilarious to me that for so many years the keyboard on iOS only had CAPITAL letters. No matter the state of the shift key, the letters on the keyboard just stayed the same. After many years they finally figured it out, but it's one example of many about how Apple just doesn't have the great UX people claim they do.
What drives me insane though, is double tapping a word is supposed to select that word. But I think starting in iOS 18 it started selecting the word and a random amount of surrounding words, but only about half the time. I couldn't tell you what it could possibly be trying to do but it's maddening.
If you tap while a word is selected, it won’t appear. If you tap on the cursor while a word isn’t selected, it will appear.
… is not being able to paste into an empty box unless I type a letter there and select it/clobber it/overwrite it
And I just LOOOOOVE not being able to tap a URL in safari and get to the end of it to add parameters or change a path anymore…
Just gave my MacBook that hasn’t been turned on in months away(i haaaaate Tahoe) and been using GrapheneOS on a pixel 7a.
so far I’m not in love with it but I’m getting used to it and starting to like downloading apps anonymously (if I name the app, I’ll probably get scolded) anyway this might be the end of the line for me and Apple.