Giter VIP home page Giter VIP logo

Comments (9)

Aguss17 avatar Aguss17 commented on June 16, 2024 1

@gunnarmein-ts it already works for me, finally the changes I had to make are:
Screenshot 2024-05-22 at 8 21 38
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.

gunnarmein-ts avatar gunnarmein-ts commented on June 16, 2024

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.

gunnarmein-ts avatar gunnarmein-ts commented on June 16, 2024

test.zip
@arnog Here is a minimal repro. Hope it helps.

from mathlive.

Aguss17 avatar Aguss17 commented on June 16, 2024

@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.

gunnarmein-ts avatar gunnarmein-ts commented on June 16, 2024

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.

Aguss17 avatar Aguss17 commented on June 16, 2024

@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.

Aguss17 avatar Aguss17 commented on June 16, 2024

@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.

gunnarmein-ts avatar gunnarmein-ts commented on June 16, 2024

@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.

Aguss17 avatar Aguss17 commented on June 16, 2024

@arnog thanks!

from mathlive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.