Skip to content

Commit c4e45c4

Browse files
author
Benjamin Pasero
committed
Can't click buttons on new notifications with a touch screen (fixes microsoft#46055)
1 parent f46b55a commit c4e45c4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/vs/base/browser/ui/button/button.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { Color } from 'vs/base/common/color';
1414
import { mixin } from 'vs/base/common/objects';
1515
import { Event, Emitter } from 'vs/base/common/event';
1616
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
17+
import { Gesture, EventType } from 'vs/base/browser/touch';
1718

1819
export interface IButtonOptions extends IButtonStyles {
1920
title?: boolean;
@@ -63,7 +64,9 @@ export class Button {
6364
'role': 'button'
6465
}).appendTo(container);
6566

66-
this.$el.on(DOM.EventType.CLICK, e => {
67+
Gesture.addTarget(this.$el.getHTMLElement());
68+
69+
this.$el.on([DOM.EventType.CLICK, EventType.Tap], e => {
6770
if (!this.enabled) {
6871
DOM.EventHelper.stop(e);
6972
return;

0 commit comments

Comments
 (0)