-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling context menu with mf.menuItems = [] does not work on mobile #2369
Comments
@arnog Seems like this could be fixed by changing
to
at the end of src/ui/menu/context-menu.ts (around line 83 in my fork) |
The get visible(): boolean {
this.updateIfDirty();
return this._menuItems.some((x) => x.type !== 'divider' && x.visible);
} |
Don't know what to tell you. Try the test case I attached above on a phone. Perhaps _menuItems is not updated correctly when menuItems is empty. |
FYI, I don't see an attached test.html. |
test.html.zip |
It's a script execution/timing issue. The When the line 36 To avoid this issue, listen for a |
Duh! I should have known better. Thanks! |
Closing. |
Description
mf.menuItems = []
works fine on a laptop, but on mobile (in a simulator and on the device), the menu appears anyway.Steps to Reproduce
load attached test.html in mobile iOS browser (simulator will be fine), context menu was disabled by
mf.menuItems = []
;press and hold any part of mathfield
Actual Behavior
context menu appears
Expected Behavior
Nothing should happen (as is the case on non-mobile)
Environment
mathlive 0.98.6
iOS Safari, latest version
The text was updated successfully, but these errors were encountered: