Giter VIP home page Giter VIP logo

Comments (8)

mspringer1 avatar mspringer1 commented on June 21, 2024 2

Tried #29 and this fix also working on iPhone or iPad

from vizanti.

mspringer1 avatar mspringer1 commented on June 21, 2024 1

I just tested the updated safari-modal-fix branch and now its working fine. I could also test #29

from vizanti.

MoffKalast avatar MoffKalast commented on June 21, 2024

Hmm, I've heard of this issue before but I don't currently have any devices capable of running Safari on hand to reproduce it. Would you be up for trying a few things to try and pinpoint what's causing it?

Looking at the related css classes, the most likely culprit is the pointer-events: auto; line in modal_outer, which if removed or set to none or inherit causes similar behaviour in chrome and firefox (clicking does nothing, the main view gets events instead). It should be supported on webkit as well, but maybe auto doesn't quite work there. Most of the other options listed here seem to get good results on chrome, so all, fill, stroke and probably some others would likely be working alternatives if they work on safari.

Another idea might be to try commenting out the lines of the noselect class which prevents selecting text when dragging, maybe one of the webkit ones is interfering with touch events.

If neither of these works then we'll have to get more creative I guess 😄

from vizanti.

mspringer1 avatar mspringer1 commented on June 21, 2024

I tried to test the changes but wasn't really successful

Trying pointer-events:

  • pointer-events: all;: does not make a difference

  • pointer-events: fill;: does not make a difference

  • pointer-events: stroke;: does not make a difference

Trying noselect class:

  • commenting out the webkit classes does not make a difference but just allows to select the text in the webpage
  • commenting out the all classes has the same effect

is there anything else i could test?

from vizanti.

MoffKalast avatar MoffKalast commented on June 21, 2024

Hmm well I've set up a branch safari-modal-fix that removes pointer-events entirely and instead has the modal container element expand on demand and always capture clicks. That ought to work I think, can you give it a test?

from vizanti.

mspringer1 avatar mspringer1 commented on June 21, 2024

I just tested the safar-modal-fix branch and unfortunately it is still the same behavior when closing a widget.

I also noticed a transparent circle icon that sometimes appears at the tapped area in safari. Maybe a magnifying glass function.
iphone_screenshot

from vizanti.

MoffKalast avatar MoffKalast commented on June 21, 2024

Ok if it really is magnifying glass related, then it may require some kind of preventDefault in the event chain that's calling it by default. I've pushed another change that adds the closing listeners directly onto the elements, and stops any propagation.

from vizanti.

MoffKalast avatar MoffKalast commented on June 21, 2024

@mspringer1 I've mentioned this issue to a friend of mine who has a mac, and it may turn out to be as simple as changing window to document in the listener part. If #29 if fixes it we can just go with that instead.

from vizanti.

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.