Comments (9)
@gunnarmein-ts it already works for me, finally the changes I had to make are:
that is, do not do this:
if (evt.type === 'blur' && Scrim.scrim?.state === 'closed')
this._mathfield?.blur();
when we are in an iframe on a touch device
and the listener that hid the keyboard I previously had in focusout and now I have put it in blur:
mf.current.addEventListener('blur', () => { getKeyboard().hide(); });
from mathlive.
I am experiencing the same - and I have some fixes in my fork, although I don't think they would hold up to Arno's standards. I will make a summary of what I did and post here if that is ok.
from mathlive.
test.zip
@arnog Here is a minimal repro. Hope it helps.
from mathlive.
@gunnarmein-ts Thank you for responding. Is there something I can do on my project to prevent this from happening while this case is being fixed in the library?
from mathlive.
fixes2.pdf
fixes1.pdf
@Aguss17 I don't know of any fix outside the library. I am attaching printouts of the changes I made. I am not going to submit a pull request for these as Arno would probably fix these issues differently. @arno I'd be happy to talk and implement a better fix.
Also notice that sometimes I check for instanceof MathfieldElement
rather than tagName === "math-field"
, because I subclass the mathfield. You can ignore that if you make your own fork.
from mathlive.
@gunnarmein-ts Thank you for your response, I will then wait to see if it gets fixed in future versions of the library.
from mathlive.
@gunnarmein-ts I have done a fork and I have put the list of changes that you mentioned in the fixed1.pdf and fixed2.pdf files. And I've been testing within an iframe and the same problem keeps happening to me. Do I need to apply any other changes?
from mathlive.
@Aguss17 I can't help you in the next few days, traveling. Perhaps it has to do with how we are using it:
- "sandboxed"
- .show() on focusin, .hide() on focusout()
Let me know how you fare. I'll try to help next week.
from mathlive.
@arnog thanks!
from mathlive.
Related Issues (20)
- Incorrect positioning of lower bound in definite integrals HOT 1
- Weird box like characters HOT 5
- Macros not available at MFE instantiation HOT 4
- TypeError while pressing arrow
- Menu shouldn't display when clicking other math field element HOT 2
- Unable to remove keybindings HOT 7
- Selection area exception in low version of chrome HOT 4
- Is it possible to "lock" the submenu of the variant?
- --keycap-height issues in iframe HOT 1
- export to mathml-core HOT 6
- PlusMinus retains some kind of state HOT 2
- Disabling context menu with mf.menuItems = [] does not work on mobile HOT 8
- onInput and onKeyDown sequencing issue
- MathfieldElement's Chinese locale configuration is invalid
- keybinding command switchMode should insert the prefix in the previous mode and the suffix with the new mode HOT 1
- Curly-bracket cannot be input when smart-fence is off
- Change Color is Not Working As Expected When Combined With Virtual Keyboard
- Can't set "\\right)" as latex for virtual keyboard HOT 7
- Repeating decimal and parenthesis HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathlive.