Internet explorer will only trigger mouse events at the window level. If
the handler is bound to both window and canvas however, the event will
be processed twice in every other browser.
A solution to this is to track manually (without affecting the bubble or
other features on the event) that an event has been processed, and don't
process it a second time.
During the recent event & focus refactor, the tab index was being set on
initialisation of the EventManager class, and would then be unset when
the local caret was removed. This meant that no new events would be sent
to WebODF (e.g., typing) after an undo.
The scroll position was only being restored if a local operation was
generated as part of the resume focus. Additional data needs to be saved
and restored of focus is simply stolen and then returned.
If no parent elements have a non-zero scroll, there is no offsets to
restore.
Element.focus() has additional logic that attempts to bring the top of
the element into view. This causes the a document that has been vertically
scrolled to reset back to the top of the document each time an Editor
button is clicked.
This redesign abstracts the event management away, and uses an invisible
div as the primary event trap. Because the div is always visible and
centred, the browser does not perform any scrolling. Non-bubbling events
are automatically forwarded from the event trap to subscribers.
Fixes Issue #44