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] Any way to fix this keyboard issue? (not in an app) #187

Closed
omar2205 opened this issue Jul 24, 2022 · 20 comments
Closed

[BUG] Any way to fix this keyboard issue? (not in an app) #187

omar2205 opened this issue Jul 24, 2022 · 20 comments

Comments

@omar2205
Copy link

Describe the bug
I have this cupertino-pane that has an input. On phone, when I click the input, the keyboard shows up and misses the pane.

The problem is, I can't even see what I'm typing.

https://i.imgur.com/lfgRSEg.mp4

To Reproduce
Steps to reproduce the behavior:

  1. Have a cupertino-pane with an input
  2. Visit on mobile
  3. Click the input
  4. See the problem
@roman-rr
Copy link
Collaborator

Hello @omar2205 thank you for issue!
Have you try to set handleKeyboard: false ? Does it work for you ?

@omar2205
Copy link
Author

Yeah, I tried it with no luck. It's not an app, it's a website.

@roman-rr
Copy link
Collaborator

@omar2205 Please confirm that only on chrome browser, or safari is also affected ?

@omar2205
Copy link
Author

Yep, the same thing with Firefox. I can't test Safari.

@omar2205
Copy link
Author

omar2205 commented Jul 25, 2022

@flangapp
Copy link

flangapp commented Aug 1, 2022

is there a quick solution?

@flangapp
Copy link

flangapp commented Aug 1, 2022

Hack solution:

For .pane class change styles:

.cupertino-pane-wrapper .pane {
position: absolute;
width: 100vw;
}

now it works as expected

@roman-rr
Copy link
Collaborator

roman-rr commented Aug 1, 2022

@flangapp thank you. Might fit some cases, but not all. I will check soon keyboard issues.

@justjoshin83
Copy link

justjoshin83 commented Jan 8, 2023

Hey guys! Just wanted to see if there's been an official resolution for the keyboard issues. My issue is that the keyboard actually covers the pane itself, so I can't see the input. If I need to open a separate issue I will, but I just wanted to check to see if there have been any updates on keyboard-related problems. Thanks!

Here is a video of the issue I'm having: https://drive.google.com/file/d/1AkvNRkxQMsU5b9XEXgk9kb1QftEzkc67/view?usp=sharing

And my cupertino settings are here:

 settings: CupertinoSettings = {       
        buttonDestroy: false,
        fitScreenHeight: false,
        lowerThanBottom: false,
        animationDuration: this.paneAnimationDuration,
        animationType: 'ease-in-out',
        preventClicks: true,
        maxFitHeight: 500,
        bottomClose: false,
        followerElement: '#pane-follower'
    };

@roman-rr
Copy link
Collaborator

roman-rr commented Jan 8, 2023

Thank you @justjoshin83
You show a different issue, compare with others here. Please create new one and I will help you to handle it.
It will faster if you also provide code samples with reproduction.
Quick overview of your bug: Try to focus input after transition end (if you do focus programmatically with .focus() );

@hackal
Copy link
Contributor

hackal commented Jan 27, 2023

I believe that the issue is related to the isFormElement function. I had similar problem (pane flying away when focusing input). Solved it by updating isFormElement to return true for content editable too. Fixed my issue

isFormElement(el) {
        const formElements = [
            'input',
            'select',
            'option',
            'textarea',
            'button',
            'label',
        ];
        if (
            (el &&
                el.tagName &&
                formElements.includes(el.tagName.toLowerCase())) ||
            el.getAttribute('contenteditable') === 'true'
        ) {
            return true;
        }
        return false;
    }

@roman-rr
Copy link
Collaborator

roman-rr commented Feb 2, 2023

Everyone's on this topic, please check v1.3.2 with recent fix and let me know if it's works better.

@omar2205
Copy link
Author

omar2205 commented Feb 2, 2023

Tested this https://whole-mole-32.deno.dev on Chrome Android it looks fixed!

@roman-rr roman-rr closed this as completed Feb 2, 2023
@Lychfindel
Copy link

Hi all, I'm having the same issue using v.1.3.2 on safari on iOS.
Moreover I see the same behaviour also on https://whole-mole-32.deno.dev/ (but i don't know if there the package was updated).

@omar2205
Copy link
Author

omar2205 commented Feb 5, 2023

https://whole-mole-32.deno.dev uses the latest version so it should be updated. Can you record it?

@Lychfindel
Copy link

https://whole-mole-32.deno.dev uses the latest version so it should be updated. Can you record it?

Here the video using Safari on iOS 16.1.1

IMG_4768.MP4

@omar2205
Copy link
Author

omar2205 commented Feb 6, 2023

This is the same behaviour I get, which I consider fixed as it is better than my video above.

@Lychfindel
Copy link

Sorry, probably I didn't get what was the bug since I cannot see any major difference between the two videos.
For me the bug is that when the input get the focus everything is pushed by the keyboard (and in the example you cannot see anymore the green background), I think the expected behaviour should be that the keyboard appears but the pane remains at the same height (so you should still see the green background).
If this is different from the bug of this issue I apologise and I will open a new one!

@omar2205
Copy link
Author

omar2205 commented Feb 6, 2023

If you check out this video https://i.imgur.com/lfgRSEg.mp4, the whole pane is pushed upwards, making the input hidden. When you close it, you can see the background on the bottom.

You may want to open a new issue if you think this behaviour is wrong.

@roman-rr
Copy link
Collaborator

roman-rr commented Aug 15, 2023

Important! All cases related to textarea please describe here #217
But in common should better after latest review.

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

No branches or pull requests

6 participants