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

chore: remove usage of deprecated setCapture api #5058

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Conversation

nightwing
Copy link
Member

fixes #5047

The intention of this code was to keep cursor as text cursor while selecting, when mouse was over a fold widget or outside of the editor. But this worked only on firefox.

If we want to keep this behavior, we can add

editor.renderer.scroller.onpointerdown = function(e) {
  editor.renderer.scroller.setPointerCapture(e.pointerId)
}

if it doesn't cause problems on mobile.

@nightwing nightwing force-pushed the remove-set-capture branch 3 times, most recently from ac76b58 to a8f65b1 Compare February 15, 2023 09:25
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Base: 86.14% // Head: 86.20% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (bab115a) compared to base (3250956).
Patch coverage: 96.29% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5058      +/-   ##
==========================================
+ Coverage   86.14%   86.20%   +0.06%     
==========================================
  Files         548      548              
  Lines       41692    41700       +8     
  Branches     6563     6564       +1     
==========================================
+ Hits        35917    35949      +32     
+ Misses       5775     5751      -24     
Flag Coverage Δ
unittests 86.20% <96.29%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/editor.js 82.78% <0.00%> (ø)
src/mouse/default_handlers.js 71.97% <ø> (+0.47%) ⬆️
src/autocomplete.js 65.34% <100.00%> (+0.09%) ⬆️
src/commands/default_commands.js 78.10% <100.00%> (+1.49%) ⬆️
src/config.js 79.76% <100.00%> (+16.66%) ⬆️
src/config_test.js 98.33% <100.00%> (ø)
src/css/editor.css.js 100.00% <100.00%> (ø)
src/ext/error_marker_test.js 98.07% <100.00%> (+0.40%) ⬆️
src/virtual_renderer_test.js 99.15% <100.00%> (+<0.01%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -1,4 +1,4 @@
module.exports = `/*
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

is this comment needed? maybe we could remove it as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is useful for generating the css code below it

@nightwing nightwing merged commit 30fc3ea into master Feb 15, 2023
@nightwing nightwing deleted the remove-set-capture branch February 15, 2023 10:16
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.

Element.setCapture is deprecated
2 participants