mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

Mathlive and Storybook Integration Issues

Open ileandreKU opened this issue 8 months ago • 4 comments

Hi,

I'm integrating [email protected] into a fresh Storybook project ([email protected]). The <math-field> component renders correctly, and I can see the embedded virtual keyboard icon/button.

However, clicking the keyboard button does not open the virtual keyboard. This occurs even when setting mathVirtualKeyboardPolicy = 'auto'.

When using mathVirtualKeyboardPolicy = 'manual', I can open the keyboard programmatically with executeCommand('showVirtualKeyboard'), so the keyboard itself is working.

This behavior only seems to occur inside Storybook. In a standalone React app, the keyboard opens properly with the same configuration.

Note: This worked previously when using [email protected] and [email protected]. After upgrading to [email protected] and [email protected], the issue begun.

Steps to reproduce:

  1. Create a new Storybook app using npm create [email protected]
  2. Install [email protected]
  3. Render a <math-field> in a story
  4. Set ``mathVirtualKeyboardPolicy = 'auto'`
  5. Try clicking the embedded keyboard icon

Expected behavior: Clicking the built-in keyboard should open the virtual keyboard. Current behavior: Nothing happens when clicking the icon

ileandreKU avatar May 02 '25 14:05 ileandreKU

Hi @arnog,

Have you had a chance to review my issue?

ileandreKU avatar May 28 '25 14:05 ileandreKU

I haven't yet tried to reproduce it. I'm not super familiar with Storybook, so it might take a while to debug.

arnog avatar May 30 '25 13:05 arnog

Okay, please let me know when you have an update.

ileandreKU avatar Jun 26 '25 16:06 ileandreKU

This could have been a duplicate of #2665 . Please let me know if it sill happens with a build that has that fix (mathlive 0.108 or later)

arnog avatar Nov 05 '25 18:11 arnog