A common use-case for UI components is to only update the UI state just
before the next frame is rendered, irrespective of how many times a
signal is fired within a given batch of operations.
The event subscriptions object allows these to be easily created and
tracked, and also makes it easier to ensure all subscriptions are cleaned
up at the end.
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.
Mimicking LibreOffice's behaviour here, when a new link + associated
display text is inserted, immediately expand the selection to these
bounds.
This change makes add & edit link behaviours consistent, as the complete
hyperlink is always selected after the edit dialog is closed.
When the current selection is collapsed within a hyperlink and an update
occurs, the selection will now be expanded to the hyperlink bounds and
updated.
Fixes#490.
* remove @license tag, for consistency with library source files
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released stuff
* separate license header by empty line from following content