File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,9 @@ export function touchPos(el: HTMLElement, touches: TouchList): Array<Point> {
7272
7373export function mouseButton ( e : MouseEvent ) : number {
7474 assert ( e . type === 'mousedown' || e . type === 'mouseup' ) ;
75- // @ts -expect-error - TS2339 - Property 'InstallTrigger' does not exist on type 'Window & typeof globalThis'.
76- if ( typeof window . InstallTrigger !== 'undefined' && e . button === 2 && e . ctrlKey &&
77- window . navigator . platform . toUpperCase ( ) . indexOf ( 'MAC' ) >= 0 ) {
75+ if ( / f i r e f o x / i. test ( navigator . userAgent ) && / m a c i n t o s h / i. test ( navigator . userAgent ) && e . button === 2 && e . ctrlKey ) {
7876 // Fix for https://github.com/mapbox/mapbox-gl-js/issues/3131:
79- // Firefox (detected by InstallTrigger) on Mac determines e.button = 2 when
77+ // Firefox on Mac (detected by user agent) determines e.button = 2 when
8078 // using Control + left click
8179 return 0 ;
8280 }
You can’t perform that action at this time.
0 commit comments