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

Unable to close search on mobile #26

Closed
Gerrit0 opened this issue Jan 18, 2021 · 2 comments · Fixed by fliegwerk/search-popup#9
Closed

Unable to close search on mobile #26

Gerrit0 opened this issue Jan 18, 2021 · 2 comments · Fixed by fliegwerk/search-popup#9
Assignees
Labels
🐛 bug Something isn't working
Milestone

Comments

@Gerrit0
Copy link

Gerrit0 commented Jan 18, 2021

Describe the bug
As titled, when loading the docs on mobile, as soon as I scroll down the search pops up in the middle of the screen and cannot be closed.

To Reproduce

  1. Go to https://fliegwerk.github.io/fliegdoc/fliegdoc/#DEFAULT_CONFIG
  2. Scroll down slightly
  3. See error

Expected behavior
Search should only show up when clicking on a search icon.

Screenshots

image

Smartphone:

  • OS: iOS
  • Browser safari
  • Version 14.3
@pklaschka
Copy link
Member

pklaschka commented Jan 18, 2021

Thanks for reporting this. I'll look into supporting mobile devices with the search as soon as possible.

Overall, mobile support is a topic that needs a lot of improvement in the near future.

Since, only a couple of days ago, this started as an internal project without any consideration on responsiveness, etc. (since internally, we only use it on Desktop), we didn't even think about search on mobile devices, to be honest (having it work "as good" as it does now is just a side-effect of using some semi-random CSS framework in the proof of concept stage 😅 ).

I wasn't able to replicate the search bar opening arbitrarily in a desktop browser (with mobile device emulation), but we'll definitely look into it (while personally, I don't own an iPhone, I think I know someone who might be able to debug this with me).

Again: Thanks for pointing this out, we're going to look into it 🙂

@pklaschka pklaschka self-assigned this Jan 18, 2021
@pklaschka pklaschka added the 🐛 bug Something isn't working label Jan 18, 2021
@pklaschka pklaschka added this to the v0.4.3 milestone Jan 18, 2021
@pklaschka
Copy link
Member

pklaschka commented Jan 18, 2021

I believe the issue is Safari's missing support for the <dialog> element. This, theoretically, makes this an issue of https://github.com/fliegwerk/search-popup, but let's track this here for better discoverability.

Cf. https://caniuse.com/dialog

@pklaschka pklaschka modified the milestones: v0.4.3, v0.6.0 Jan 18, 2021
pklaschka added a commit to fliegwerk/search-popup that referenced this issue Jan 23, 2021
1. Use custom dialog implementation to increase compatibility since, for now, the <dialog> element doesn't provide the compatibility we need
2. Revamp file structure to make long files shorter and more readable

Refs: fliegwerk/fliegdoc#26
pklaschka added a commit to fliegwerk/search-popup that referenced this issue Jan 23, 2021
1. Use custom dialog implementation to increase compatibility since, for now, the <dialog> element doesn't provide the compatibility we need
2. Revamp file structure to make long files shorter and more readable

Refs: fliegwerk/fliegdoc#26
Closes: fliegwerk/fliegdoc#26
pklaschka added a commit that referenced this issue Jan 24, 2021
…due to incompatibility

v2 uses its own implementation of dialogs which increases cross-browser compatibility. Unfortunately, it's incompatible with `scroll-behavior: smooth` on some browsers (tested in Chrome, it's working in Firefox), meaning, for now, we lose smooth scrolling here.

Refs: #26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants