Skip to content

Commit 203b26d

Browse files
authored
1 parent 98a77dc commit 203b26d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/vs/base/browser/globalPointerMoveMonitor.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,17 @@ export class GlobalPointerMoveMonitor implements IDisposable {
6464
try {
6565
initialElement.setPointerCapture(pointerId);
6666
this._hooks.add(toDisposable(() => {
67-
initialElement.releasePointerCapture(pointerId);
67+
try {
68+
initialElement.releasePointerCapture(pointerId);
69+
} catch (err) {
70+
// See https://github.com/microsoft/vscode/issues/161731
71+
//
72+
// `releasePointerCapture` sometimes fails when being invoked with the exception:
73+
// DOMException: Failed to execute 'releasePointerCapture' on 'Element':
74+
// No active pointer with the given id is found.
75+
//
76+
// There's no need to do anything in case of failure
77+
}
6878
}));
6979
} catch (err) {
7080
// See https://github.com/microsoft/vscode/issues/144584

0 commit comments

Comments
 (0)