Skip to content

Commit

Permalink
Skip userSelect check on pointerdown events
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarhermoso committed Feb 1, 2025
1 parent bd6af67 commit 1c9f983
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/editor-mathfield/mathfield-private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,9 @@ If you are using Vue, this may be because you are using the runtime-only build o
break;

case 'pointerdown':
if (!evt.defaultPrevented && this.userSelect !== 'none') {
// Comment out this.userSelect !== none because it breaks on Chrome
// https://github.com/kedyou/kedyou-frontend/issues/1150
if (!evt.defaultPrevented /** && this.userSelect !== 'none' */) {
onPointerDown(this, evt as PointerEvent);
// Firefox convention: holding the shift key disables custom context menu
if ((evt as PointerEvent).shiftKey === false) {
Expand Down Expand Up @@ -1240,8 +1242,8 @@ If you are using Vue, this may be because you are using the runtime-only build o
mode === 'latex'
? 'latex'
: mode === 'math'
? 'plain-text'
: 'ascii-math';
? 'plain-text'
: 'ascii-math';

const selRange = range(model.selection);
let content = this.model.getValue(selRange, format);
Expand Down

0 comments on commit 1c9f983

Please sign in to comment.