Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vs/editor/browser/controller/pointerHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class PointerHandler extends Disposable {

constructor(context: ViewContext, viewController: ViewController, viewHelper: IPointerHandlerHelper) {
super();
const isPhone = platform.isIOS || (platform.isAndroid && platform.isMobile);
const isPhone = platform.isIOS || platform.isAndroid;
if (isPhone && BrowserFeatures.pointerEvents) {
Comment on lines +144 to 145

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Including Android tablets is the intent of this PR — on tablets the TouchEvent fallback means a stylus can only scroll, never select text (see the PR description). Two points on the suggested alternatives:

  • The condition is already gated by actual pointer capabilities: the handler is only chosen when BrowserFeatures.pointerEvents is true, otherwise the TouchEvent/mouse fallbacks apply as before.
  • There is precedent for tablets on this path: platform.isIOS already routes iPads through PointerEventHandler, where finger scrolling and pen selection coexist fine. This change just gives Android tablets the same treatment, and it behaves the same way in testing on a Samsung tablet with an S Pen (pen selects, finger scrolls, mouse unchanged — details in Support stylus/pen text selection on Android coder/code-server#7841).

this.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));
} else if (mainWindow.TouchEvent) {
Expand Down