ionic-team / cordova-plugin-ionic-keyboard

Keyboard Plugin for Cordova
Other
192 stars 177 forks source link

Unable to create correctly working UI with several form inputs on iOS #126

Open corran2go opened 4 years ago

corran2go commented 4 years ago

As follow up to #125 I've done some more tests, and didn't get a correctly working UI with forms which inputs get overlayed by the iOS keyboard.

My expectation is that I'am able to use some kind of configuration that scrolls the tapped input element into view no matter where it is on the page or even on a modal with scrolling content.

See demo repo

ionic info

test setup and steps to follow

michaelpeterlee commented 4 years ago

These patches may provide some interim help for folks, below.

PATCH:

const fIosCordovaKeyboardBugfix = () => {
         if (sPlatform === 'iOS') {
            setTimeout(()=>{
               document.getElementById("id-select").scrollIntoView();
            },500);
         };
      };

<select id="id-select" onFocus={fIosCordovaKeyboardBugfix} />

Re: https://3x.ant.design/components/select/ Ant Design UI select component required further work, requires implementation of getPopupContainer property. You could look into that component to see what they are doing.