Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always call exitPointerLock #6458

Merged
merged 1 commit into from
Oct 7, 2024
Merged

always call exitPointerLock #6458

merged 1 commit into from
Oct 7, 2024

Conversation

balazsbajorics
Copy link
Contributor

Problem:
If a scrubbing using the new pointer lock based scrubber control was quick enough, we would often not release the pointer on mouse up – instead leaving you with a hidden cursor until you press Esc.

Fix:
Turns out, document.pointerLockElement is still null for a few moments after getting pointer lock, and our code calling document.exitPointerLock checks if the pointer lock element is the same as the current control's target.

By simply removing the check, we call exitPointerLock() all of the time, making it not brittle anymore.

Copy link
Contributor

github-actions bot commented Oct 2, 2024

Try me

Copy link

relativeci bot commented Oct 2, 2024

#14533 Bundle Size — 57.79MiB (~-0.01%).

a1d2531(current) vs 916e8b9 master#14532(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Improvement 1 improvement
                 Current
#14533
     Baseline
#14532
Improvement  Initial JS 40.74MiB(~-0.01%) 40.74MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 18.03% 18.26%
No change  Chunks 23 23
No change  Assets 25 25
No change  Modules 4106 4106
No change  Duplicate Modules 214 214
No change  Duplicate Code 27.47% 27.47%
No change  Packages 475 475
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Improvement 2 improvements
                 Current
#14533
     Baseline
#14532
Improvement  JS 57.78MiB (~-0.01%) 57.78MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch fix/pointer-lockProject dashboard


Generated by RelativeCIDocumentationReport issue

@balazsbajorics balazsbajorics merged commit a20a528 into master Oct 7, 2024
16 checks passed
@balazsbajorics balazsbajorics deleted the fix/pointer-lock branch October 7, 2024 11:47
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**
If a scrubbing using the new pointer lock based scrubber control was
quick enough, we would often not release the pointer on mouse up –
instead leaving you with a hidden cursor until you press Esc.

**Fix:**
Turns out, `document.pointerLockElement` is still null for a few moments
after getting pointer lock, and our code calling
`document.exitPointerLock` checks if the pointer lock element is the
same as the current control's target.

By simply removing the check, we call exitPointerLock() all of the time,
making it not brittle anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants