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

Element.setCapture is deprecated #5047

Closed
scris opened this issue Feb 1, 2023 · 0 comments · Fixed by #5058
Closed

Element.setCapture is deprecated #5047

scris opened this issue Feb 1, 2023 · 0 comments · Fixed by #5058

Comments

@scris
Copy link

scris commented Feb 1, 2023

Describe the bug

These warnings were generated, when using latest Firefox and ace-builds 1.15.0.

Element.setCapture() is deprecated. Use Element.setPointerCapture() instead. 
For more help https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture (ace.js:2647:37)
Element.releaseCapture() is deprecated. Use Element.releasePointerCapture() instead. 
For more help https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture (ace.js:2711:54)

On line 2647, we have this, and was indeed using the deprecated API.

if (editor.renderer.scroller.setCapture) {
  editor.renderer.scroller.setCapture();
}

Expected Behavior

No warnings should be shown.

Current Behavior

Two warnings were generated.

Reproduction Steps

Use node ace-build based web page on Firefox, and click into the editor.

Possible Solution

Turn to use newer ways, e.g. Element.setPointerCapture().

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

ace-builds 1.15.0, Firefox 109 on macOS 13

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

Successfully merging a pull request may close this issue.

2 participants