arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.26k stars 260 forks source link

Typing / char doesn't produce fraction (bépo layout) #2414

Open dcaillibaud opened 1 week ago

dcaillibaud commented 1 week ago

Description

On https://cortexjs.io/mathlive/demo/ typing a "/" char with my keyboard (bépo layout) display it without building a fraction.

Steps to Reproduce

go to https://cortexjs.io/mathlive/demo/ with a bépo keyboard layout, focus in the first input then type "+" then "1" then "/" (key 9 on qwerty | azerty keyboard) then "2"

Actual Behavior

display "+1/2" with latex code +1/2

image

Expected Behavior

(Required) What did you expect to happen instead?

Display a fraction with the latex code +\frac{1}{2}

Details

Here is a Keydown Event thrown by my "/" keystroke

{
  isTrusted: true,
  altKey: false,
  bubbles: true,
  cancelBubble: false,
  cancelable: true,
  charCode: 0,
  code: "Digit9",
  composed: true,
  ctrlKey: false,
  currentTarget: null,
  defaultPrevented: false,
  detail: 0,
  eventPhase: 0,
  isComposing: false,
  key: "/",
  keyCode: 191,
  location: 0,
  metaKey: false,
  repeat: false,
  returnValue: true,
  shiftKey: false,
  sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false},
  srcElement: input,
  target: input,
  timeStamp: 43702.60000002384,
  type: "keydown",
  view: Window {…},
  which: 191
}

Environment

MathLive version 0.100.0

On Linux debian 12. It's the same with chromium & firefox