following: detect key event as soon as possible
it can happen that we will early return from the keyboard handler and we will not mark we want to stop following Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I28ce533b7f3c1d8c189434d0f51e727ca74cb57f
This commit is contained in:
parent
04d15a170e
commit
ca5976db0e
1 changed files with 3 additions and 3 deletions
|
@ -451,6 +451,9 @@ L.Map.Keyboard = L.Handler.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
// if any key is pressed, we stop the following other users
|
||||
this._map.userList.followUser(this._map._docLayer._viewId);
|
||||
|
||||
if (window.KeyboardShortcuts.processEvent(app.UI.language.fromURL, ev)) {
|
||||
ev.preventDefault();
|
||||
return;
|
||||
|
@ -602,9 +605,6 @@ L.Map.Keyboard = L.Handler.extend({
|
|||
}
|
||||
}
|
||||
|
||||
// if any key is pressed, we stop the following other users
|
||||
this._map.userList.followUser(this._map._docLayer._viewId);
|
||||
|
||||
L.DomEvent.stopPropagation(ev);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue