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 e2eaefa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kedyou/mathlive",
"version": "0.101.0",
"version": "0.101.1",
"description": "A web component for math input",
"license": "MIT",
"funding": {
Expand Down
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 e2eaefa

Please sign in to comment.