Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: Version: 1.66.0 (Universal) Steps to Reproduce: a tablet input device, drag to select text in the content area lifting the pen, let the drag continue outside of that area. Expected Behavior: The vertical position of the drag continues to influence the selection. Actual Behavior: The position of the cursor has no effect on the selection while outside of the content area. Notes: As shown in the videos, this worked as expected in 1.65.2, and began to fail in 1.66.0. This continues to not work as expected in the Insiders build. https://user- https://user-
I believe this will also be fixed by .
closedWith
This now works occasionally, but not all the time. It's pretty unpredictable - a file where it was previously working often will, on blur and refocus, stop working. Switching to a different tab, and then back to the failing tab, seems to always fix it temporarily. Edit: This is on
Moving to the next milestone because based on the comment above, the issue still seems flaky
Do any errors appear in the Developer Tools? (). Do I understand this correctly that you are using a mac with a special input device which allows you to use a pen on an external tablet to manipulate the macos cursor? Could you please try the following page in Chrome? open open developer tools (cmd+alt+i) click with the input device inside the red rectangle and drag around, and then release what is the output? do you receive events when dragging outside the red area? This is how it looks for me when doing it with the mouse. The event counter increases when the mouse is outside the red area: <img width="230" alt="image" src="https://user-"
Thanks for the easy test! That's correct. I'm using a Huion HS64. No problem. Here is a video using the trackpad: https://user- and a video using the stylus and tablet: https://user- Note that the above videos were taken after clicking around a few times and then clearing the console. Interestingly, on a hard refresh, I get the following error when attempting to use the stylus: <img width="386" alt="image" src="https://user-"No such error appears when I use the trackpad. And after I've clicked the trackpad even once, the error no longer appears for the stylus, and I get the events recorded in above.
Could you please try out with the ?
is working perfectly!

Discussion:
// because their `e.detail` is always 0. // We will therefore save the pointer id for the mouse and then reuse it in the `mousedown` event // for `element.setPointerCapture`. <del> let mousePointerId: number = 0; this._register(mouseEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerType, pointerId) => { if (pointerType === 'mouse') { mousePointerId = pointerId; } </del> <ins> let capturePointerId: number = 0; this._register(mouseEvents.onPointerDown(this.viewHelper.viewDomNode, (e, pointerId) => { capturePointerId = pointerId; </ins> })); // The `pointerup` listener registered by `GlobalEditorPointerMoveMonitor` does not get invoked 100% of the times. // I speculate that this is because the `pointerup` listener is only registered during the `mousedown` event, and perhaps

this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, dom.EventType.POINTER_UP, (e: PointerEvent) => { this._mouseDownOperation.onPointerUp(); })); <del> this._register(mouseEvents.onMouseDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e, mousePointerId))); </del> <ins> this._register(mouseEvents.onMouseDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e, capturePointerId))); </ins> const onMouseWheel = (browserEvent: IMouseWheelEvent) => { this.viewController.emitMouseWheel(browserEvent);

}); } <del> public onPointerDown(target: HTMLElement, callback: (e: EditorMouseEvent, pointerType: string, pointerId: number) => void): IDisposable { </del> <ins> public onPointerDown(target: HTMLElement, callback: (e: EditorMouseEvent, pointerId: number) => void): IDisposable { </ins> return dom.addDisposableListener(target, dom.EventType.POINTER_DOWN, (e: PointerEvent) => { <del> callback(this._create(e), e.pointerType, e.pointerId); </del> <ins> callback(this._create(e), e.pointerId); </ins> }); }