Skip to content

Conversation

@Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Dec 5, 2023

☑️ Resolves

🖌️ UI Checklist

🚧 Tasks

  • To test:
    • Set INACTIVE_TIME_MS to a lesser value (or wait 3 minutes)
    • Unfocus window (switch to another, or start screenshare)
    • Enter mouse cursor onto tab and leave like this
    • Wait for interval - session should be still active
    • Move cursor away from tab
    • Wait for interval - session should be marked as inactive

🏁 Checklist

  • 🌏 Tested with Chrome, Firefox and Safari or should not be risky to browser differences
  • ⛑️ Tests are included or not possible

@Antreesy Antreesy added this to the 💞 Following Major (29) milestone Dec 5, 2023
@Antreesy Antreesy requested a review from DorraJaouad December 5, 2023 11:54
@Antreesy Antreesy self-assigned this Dec 5, 2023
@Antreesy Antreesy force-pushed the fix/11126/more-activity-events branch from 3effca2 to 20dabaf Compare December 5, 2023 12:59
@Antreesy
Copy link
Contributor Author

Antreesy commented Dec 5, 2023

cc @nickvergessen for behavior change, @SystemKeeper for checking on Safari

@SystemKeeper
Copy link
Contributor

@SystemKeeper for checking on Safari

Not working in safari it seems:

Bildschirmaufnahme.2023-12-05.um.21.21.18.mov

@DorraJaouad
Copy link
Contributor

maybe try mouseover and mouseout ?

@SystemKeeper
Copy link
Contributor

SystemKeeper commented Dec 6, 2023

I tried to add (also tried mouseover):

		document.addEventListener('mousemove', (event) => {
			console.log('Move')
		})

But I only see "Move" output when the window is focussed in safari, as soon as another window is focussed, no 'Move' is logged.

Scrolling seems to work:

		document.getElementsByClassName('scroller').forEach((element) => {
			element.addEventListener('scroll', (event) => {
				console.log('Scroll')
			})
		})

but not sure if this also fires when we programmatically scroll.

@Antreesy
Copy link
Contributor Author

Antreesy commented Dec 6, 2023

Tested as well, seems that MacOS tries to save resources here, on inactive tabs:

  • For Safari events on blurred window are disabled
  • For Chrome they work, but throttled (caught 1 mousemove event compared to hundreds on active)

So I'd raise an issue to track that for Safari cases, but see nothing we could do atm

Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, it is fine to skip Safari for now.
Tested on Firefox and Chrome ✅

@Antreesy Antreesy merged commit 4edb17f into main Dec 6, 2023
@Antreesy Antreesy deleted the fix/11126/more-activity-events branch December 6, 2023 16:47
@Antreesy
Copy link
Contributor Author

Antreesy commented Dec 6, 2023

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move mouse or scroll chat but without focusing on window still marks session inactive

4 participants