discourse/discourse — pull request #593 by ZogStriP (2013-03-30 02:00:47+00:00)
Title: Get the "quote reply" button working on iOS

First attempt at getting the quote reply button to work on iOS.

This uses the `selectionchange` event that is triggered whenever the selection is changed.
This event is **only** available in IE, Chrome & Safari.

![Screenshot_29_03_13_16_47](https://f.cloud.github.com/assets/362783/319747/ad70c7a2-98dc-11e2-98b5-ac743e0404b6.png)

There are some **quirks** tough: for example, when the selection is short, the native `Cut/Copy/Paste` dialog will overlap with the button.

This requires #561 to work properly. If you test it now, the button will appear at `{0; 0}`, ie. at the top left of the page.

One good thing is that it solve the issue that the selected text would not be the one quoted when you first select some text with the mouse **and** then adjust your selection with the keyboard.