Commit Graph
8 Commits
Author SHA1 Message Date
Philip Peitsch 571bb6366e Bind window-related events on direct element as well (IE compatibility)
These events will not bubble up to the window if consumed by the canvas
element.
2013-11-19 20:25:17 +11:00
Friedrich W. H. Kossebau c2a795e668 Update link to repo: now https://github.com/kogmbh/WebODF/ 2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau 508570dab8 Add copy of the AGPL3 to sources (+ add to created zip files) 2013-10-21 17:55:16 +02:00
Philip Peitsch f4cc324fdf Ensure the tabIndex is reset when the local user's caret is re-added after undo/redo
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.
2013-10-11 12:35:10 +02:00
Philip Peitsch a6dedeed4f Add additional scroll handling when canvas regains focus
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.
2013-10-09 23:22:11 +11:00
Philip Peitsch 04a5bee3b4 Re-implement focus-without-scroll behaviour in Chrome
Previous fix attempt for issue #44 had the unintented side effect of
stopping shift+click from expanding the selection (issue #109).

The scroll-on-change behaviour has actually already been modified as
part of 90d6776. The delay put in to CaretManager.ensureCaretVisible now
ensures the caret is scrolled into view correctly once focus has been
properly set. This eliminates the need for the hidden event trap.

Fixes issue #109

Relevant test:
https://chromium.googlesource.com/chromium/blink/+/ae8d18613905f501a3ce9ba83193fe77e920afbf/LayoutTests/fast/scrolling/scroll-element-into-view.html
2013-10-09 20:11:05 +11:00
Friedrich W. H. Kossebau 21f6a42d98 Fix crash in gui.EventManager.unsubscribe(), splice called on wrong object 2013-10-04 23:38:52 +02:00
Philip Peitsch 84e221082f Allow event focus to be returned to SessionController without scrolling to the top of the ODF canvas
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
2013-10-04 19:24:13 +02:00