kogmbh/WebODF — pull request #704 by peitschie (2014-07-07 08:33:07+00:00)
Title: Provide "real" selection content to aid text2speech tools

Text-to-speech and screen readers use the browser's selection to determine what the current selected text is. Some browsers (e.g., Safari on OSX) think the text content of the event trap is the currently selected content, and only vocalise the letter "b".

Cope with this by serialising the currently selected text to the input field on redraw. On a 1000 page text-only document, this can add sizeable performance impact (400ms to execute synchronizeWindowSelection), but as this only occurs when the cursor is updated, and only once per redraw, the actual end user impact is reasonably minimal.