panes icon indicating copy to clipboard operation
panes copied to clipboard

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

Open omar2205 opened this issue 2 years ago • 8 comments

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

omar2205 avatar Jul 24 '22 03:07 omar2205

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

roman-rr avatar Jul 25 '22 06:07 roman-rr

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

omar2205 avatar Jul 25 '22 06:07 omar2205

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

roman-rr avatar Jul 25 '22 07:07 roman-rr

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

omar2205 avatar Jul 25 '22 08:07 omar2205

@roman-rr I made this quick demo https://whole-mole-32.deno.dev/ Playground https://dash.deno.com/playground/whole-mole-32

omar2205 avatar Jul 25 '22 08:07 omar2205

is there a quick solution?

flangapp avatar Aug 01 '22 11:08 flangapp

Hack solution:

For .pane class change styles:

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

now it works as expected

flangapp avatar Aug 01 '22 11:08 flangapp

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

roman-rr avatar Aug 01 '22 16:08 roman-rr

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'
    };

justjoshin83 avatar Jan 08 '23 00:01 justjoshin83

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() );

roman-rr avatar Jan 08 '23 01:01 roman-rr

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;
    }

hackal avatar Jan 27 '23 10:01 hackal

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

roman-rr avatar Feb 02 '23 13:02 roman-rr

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

omar2205 avatar Feb 02 '23 13:02 omar2205

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).

Lychfindel avatar Feb 05 '23 23:02 Lychfindel

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

omar2205 avatar Feb 05 '23 23:02 omar2205

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

https://user-images.githubusercontent.com/58313635/216852354-759c2b69-dbf5-408a-a5c6-9a8711ccaa3e.MP4

Lychfindel avatar Feb 05 '23 23:02 Lychfindel

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

omar2205 avatar Feb 06 '23 00:02 omar2205

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!

Lychfindel avatar Feb 06 '23 00:02 Lychfindel

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.

omar2205 avatar Feb 06 '23 07:02 omar2205

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

roman-rr avatar Aug 15 '23 05:08 roman-rr