Code change:
class HitTestRequest extends BareHitTestRequest { private readonly _ctx: HitTestContext; <del> public readonly target: HTMLElement | null; public readonly targetPath: Uint8Array; </del> <ins> private readonly _eventTarget: HTMLElement | null; public readonly hitTestResult = new Lazy(() => MouseTargetFactory.doHitTest(this._ctx, this)); private _useHitTestTarget: boolean; private _targetPathCacheElement: HTMLElement | null = null; private _targetPathCacheValue: Uint8Array = new Uint8Array(0); public get target(): HTMLElement | null { if (this._useHitTestTarget) { return this.hitTestResult.value.hitTarget; } return this._eventTarget; } </ins> <del> constructor(ctx: HitTestContext, editorPos: EditorPagePosition, pos: PageCoordinates, relativePos: CoordinatesRelativeToEditor, target: HTMLElement | null) { </del> <ins> public get targetPath(): Uint8Array { if (this._targetPathCacheElement !== this.target) { this._targetPathCacheElement = this.target; this._targetPathCacheValue = PartFingerprints.collect(this.target, this._ctx.viewDomNode); } return this._targetPathCacheValue; } constructor(ctx: HitTestContext, editorPos: EditorPagePosition, pos: PageCoordinates, relativePos: CoordinatesRelativeToEditor, eventTarget: HTMLElement | null) { </ins> super(ctx, editorPos, pos, relativePos); this._ctx = ctx; <ins> this._eventTarget = eventTarget; </ins> <del> if (target) { this.target = target; this.targetPath = PartFingerprints.collect(target, ctx.viewDomNode); } else { this.target = null; this.targetPath = new Uint8Array(0); } </del> <ins> // If no event target is passed in, we will use the hit test target const hasEventTarget = Boolean(this._eventTarget); this._useHitTestTarget = !hasEventTarget; </ins> } public override toString(): string { return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}nttarget: ${this.target ? (<HTMLElement>this.target).outerHTML : null}`; } <ins> public get wouldBenefitFromHitTestTargetSwitch(): boolean { return ( !this._useHitTestTarget && this.hitTestResult.value.hitTarget !== null && this.target !== this.hitTestResult.value.hitTarget ); } public switchToHitTestTarget(): void { this._useHitTestTarget = true; } </ins> private _getMouseColumn(position: Position | null = null): number { if (position && position.column < this._ctx.viewModel.getLineMaxColumn(position.lineNumber)) { // Most likely, the line contains foreign decorations...

Related discussion:
text: <!-- 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/No <!-- 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: 1.88.0-insider in Safari OS Version: macOS Steps to Reproduce: Safari open a file with: to the right of any the cursor goes to the beginning of the line not the end This does not repro in stable
I didn't do any changes the last couple of milestones that could (easily) explain this. Can you reproduce this in the monaco editor? If so, can you do a bisect?
I bisected it to this commit: (the commit before it) does not repro the issue. This wasn't in Monaco editor, I just used run code web:
This commit is just a rename refactoring. It is very unlikely it causes this... This does not reproduce in chrome, right?
The bug does not reproduce in Edge on macOS, but it repros in Safari.
Unfortunately, I don't have access to Safari. Can you double check that this is caused by that commit? Can you locally rename the class back to the original name and see if it still happens? It does not make any sense that this commit would cause this behavior only on Safari.
Ok and I paired a bit on this and are really stumped. Bad news: That commit I called out seems to be a red herring. Good news: we can repro in the Monaco Editor Playground.