3

Is it possible to capture text from Safari using a bookmarklet on an iPod Touch/iPhone when running iOS7?

In iOS6 I could select text, and then open a bookmarklet (like this one for example) which grabbed the text using window.getSelection().

However, it seems in iOS7, any action to invoke a bookmarklet deselects the text. Am I just missing something, or is this broken?

3

AFAIK it's no longer possible.

Tried looking at the contents of window.getSelection() by remote debugging my iPhone through Safari. Text is indeed deselected. But even visually, I'm able to see that text is deselected when you tap a link or open the bookmarks menu.

In regards to describing this as "broken", I suppose it's a matter of how you look at it. It could be argued that deselecting is the correct behavior and therefore I doubt it's something that'll get "fixed".

  • I thought so. Perhaps later in the month when I have a little more time I'll file a radar... not today alas. – Matthew G. Dec 12 '13 at 20:39
  • Nice work both of you - it's a pretty ugly regression so if someone files a radar, pls post it here and I'll gladly dupe it. – bmike Dec 12 '13 at 20:56
  • @bmike Submitted as radar 15656765 -- gist.github.com/mgaudet/7947377 – Matthew G. Dec 13 '13 at 16:56
  • @MatthewG. Perfect. Dupe is at openradar.me/15656950 and also check out quickradar.com if you're so inclined. – bmike Dec 13 '13 at 17:23
  • @bmike looks cool: Bookmarked. If I ever get off my butt and start doing development on apple platforms, it'll come in handy. – Matthew G. Dec 13 '13 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .