Skip to content
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

Links outside the component does not work on iPad Landscape mode #350

Open
Yunus0497 opened this issue Mar 18, 2021 · 4 comments
Open

Links outside the component does not work on iPad Landscape mode #350

Yunus0497 opened this issue Mar 18, 2021 · 4 comments

Comments

@Yunus0497
Copy link

I had used this library in my Navigation bar component, which has dropdowns, so that, any clicks outside the navbar component should prompt the dropdown to close. It was working fine in all the devices, except in the iPad, that too, only on iPad landscape mode.

None of the links(anchor tags) or buttons worked while the iPad orientations is landscape, however the buttons worked when tapped with two fingers.

@Pomax
Copy link
Owner

Pomax commented Mar 18, 2021

When you run a connected Safari for remote debugging, any errors in the dev console?

@Yunus0497
Copy link
Author

Not a single error or anything on the console or the Network tab. Although I'm tapping the buttons/links, it was just like nothing happened on the Developer tools.

@Pomax
Copy link
Owner

Pomax commented Mar 18, 2021

Is this on the most recent safari? (Safari's kind of become the new IE, it seems to intentionally do things in ways that break code written to work cross-browser)

I don't have an ipad, but some more test results might help surface enough information that someone knows what's wrong:

  • does this happen when loading in portrait and then tilting to portrait?
  • does this happen when loading already in landscape mode?
  • the code runs up the ancestor chain for elements that receive a click: if you add a console log to your code like document.addEventListener(click, evt => console.log({ element: evt.target })), does the parentNode go all the way up through body to html to null?

@Yunus0497
Copy link
Author

  1. Yes it is happening on the most recent Safari. I couldn't check in the previous versions.
  2. It is happening both times(while loading in portrait, then tilting to landscape, and also while loading already in landscape).
  3. I just included an onclick handler on some of the anchors and buttons to log something on the console. But it didn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants