mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
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