mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
Consider mouse-clicking as user activity
It's a bit non-sensical that moving the mouse constitutes user activity, but clicking it does not. Fix it.
This commit is contained in:
parent
605c567fde
commit
3e8cb47abe
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,7 @@ class UserActivity {
|
|||
* Start listening to user activity
|
||||
*/
|
||||
start() {
|
||||
document.onmousedown = this._onUserActivity.bind(this);
|
||||
document.onmousemove = this._onUserActivity.bind(this);
|
||||
document.onkeypress = this._onUserActivity.bind(this);
|
||||
// can't use document.scroll here because that's only the document
|
||||
|
@ -46,6 +47,7 @@ class UserActivity {
|
|||
* Stop tracking user activity
|
||||
*/
|
||||
stop() {
|
||||
document.onmousedown = undefined;
|
||||
document.onmousemove = undefined;
|
||||
document.onkeypress = undefined;
|
||||
window.removeEventListener('wheel', this._onUserActivity.bind(this), true);
|
||||
|
|
Loading…
Reference in a new issue