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

[BUG] Incorrect processing of removing focus from input #208

Closed
Noothing opened this issue Jul 20, 2023 · 1 comment
Closed

[BUG] Incorrect processing of removing focus from input #208

Noothing opened this issue Jul 20, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Noothing
Copy link

Incorrect processing of removing focus from input on android devices. As the result, styles and meta tag "viewport" is still for focused input, but cupertino is closed. I have tried to make input blur before closing pane, but it is not working

Steps to reproduce the behavior:

  1. Open cupertino with input inside
  2. Focus on input
  3. Press hand made close button
  4. Meta tag

Some screens:
image
image

Expected behavior:
Removing all styles on blur

  • Device: Samsung Galaxy S22 Ultra
  • OS: Android 13
  • Browser: Chrome
  • Browser version: 114.0.5735.196
  • Cupertino version: 1.3.41
@roman-rr roman-rr self-assigned this Jul 20, 2023
@roman-rr roman-rr added the bug Something isn't working label Jul 20, 2023
@roman-rr
Copy link
Collaborator

@Noothing Thank you. Quick solution for you:

let settings = {
   // ...
   events: {
     onWillDismiss: (ev) => {
         document.documentElement.style.removeProperty('overflow');
         document.body.style.removeProperty('min-height');
         document.querySelector('meta[name=viewport]').setAttribute('content', 'viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no');
     }
   }
};

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

No branches or pull requests

2 participants