Commit Graph

13 Commits (b9457a06810e0c3ea50aab3a7192a449ad5f7c32)

Author SHA1 Message Date
Luke Barnard 8291b36b3e Use document.onkeydown instead of onkeypress 2017-04-27 10:16:24 +01:00
Matthew Hodgson c2f2fb3816 use passive event listener for mousewheel 2016-09-07 22:54:37 +01:00
Richard van der Hoff 2ac88a3d89 Make the read-marker less annoying
We considered the user active if there had been a user_activity event within
the last 500ms, but those events were only raised every 500ms, so it was
possible that we would be considered inactive immediately. Use
UserActivity.userCurrentlyActive() instead, which fixes this.

Also increase CURRENTLY_ACTIVE_THRESHOLD_MS to 2 seconds.
2016-03-22 12:15:17 +00:00
Richard van der Hoff 3e8cb47abe 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.
2016-02-12 10:19:45 +00:00
David Baker 740c22238e Better date syntax 2016-01-14 16:15:07 +00:00
David Baker 4f21e2beb3 Suffix with units 2016-01-14 16:13:50 +00:00
David Baker 7e5d4b8ce8 Send an event at the end of user activity too and use this to send RRs. 2016-01-14 16:01:31 +00:00
David Baker 581111e1a7 Use wheel, not scroll as we get scroll events from auto scroll down. Also only do the cursor move check for mouse move events. 2016-01-09 00:06:54 +00:00
David Baker 1c4d1d2507 Make scrolling count as user activity. 2016-01-08 22:19:31 +00:00
Matthew Hodgson 0772f50fab update copyright for 2016 2016-01-07 04:06:52 +00:00
Matthew Hodgson ba090a6ad5 only dispatch user_activity event if the mouse actually moves (rather than the DOM moving under the mouse) 2015-11-29 15:39:10 +00:00
David Baker 31b083d93e new Date() syntax & units on var name 2015-11-18 14:51:06 +00:00
David Baker a850f19cd4 Separate out the activity watcher from presence code so I can hook read receipts into it without tangling it into the presence code. 2015-10-26 13:54:54 +00:00