Bookmarklets on iOS app

Marco Arment, creator of Instapaper, has posted an excellent open enhancement request to Apple regarding issues creating bookmarklets on iOS devices. I agree with most of his statements, and he has some excellent proposals for fixes to the issue.

He has overlooked another key and related problem with Mobile Safari.  The fact that the act of touching a toolbar to select a bookmark voids any text selections in the current web page — making it impossible for a bookmarklet to access that text selection and forward it to a web service or iOS app.

Marco, is primarily concerned with using bookmarklets for URLs, but text selections are also an important use. I’ve added protocol handler support in Terminology’s upcoming 1.3 release, but it is of limited use because of this hurdle.  I would like you to be able to select a word or phrase in a web page, and select a bookmarklet to have Terminology open with that term selected, but without access to the text selection it can’t be done.

Note there is one exception to this rule, exclusively on the iPad.  If you have bookmark in the bookmark bar, and you have changed the Safari preferences to always show the bookmark bar (so it doesn’t hide itself), then the text selection does work in the bookmarklet.

I’ve filed a bug with Apple regarding this issue:

rdar://8562369

And here’s another existing report:

rdar://7013257

Please take note of these and vote them up as well.