Skip to content

Dynamically allow the keyboard resize mode to be changed on a view by view basis #15459

Closed
@kensodemann

Description

@kensodemann

Feature Request

Describe the Feature Request

Note: this may be a cordova-plugin-ionic-keyboard issue, but creating it here on request so we can get it on the project board.

A community member I am working with says:

there used to be a function (disableScroll) in the deprecated plugin to prevent the keyboard from resizing the webview. For some reason this has been removed in the new version of the keyboard plugin and the resizing of the webview can only be controlled at the app-level (rather than on a per component basis) by specifying preferences in . the `config.xml`. I attached a screenshot with the implementation showing how the method has been removed)

Based on the name of the method, I am going to say that perhaps the prevention of the resize was perhaps a side-effect of disableScroll() but not why the function existed. Further clarification from the community member follows:

In the"Unwanted Behavior" video, we have the following keyboard resize mode settings:

This will always cause the window to resize which will squish the image as soon as the keyboard appears (non working version)

<preference name="KeyboardResize" value="true" /> 
<preference name="KeyboardResizeMode" value="native" /> 

What is intended is the behavior shown in the 'Wanted Behavior" video which I have simulated by disabling the keyboard resize at the app-level.

<preference name="KeyboardResize" value="false" /> 

Essentially, the use case would be to be able to have the KeyboardResize enabled but have a function that you can call to disable this resizing behavior for a specific component.

Describe Preferred Solution

I believe what is desired is a way to change the behavior on a page-by-page basis rather than at the application level as is currently done via the preferences.

Additional Context
List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to add, use case, Stack Overflow links, forum links, screenshots, OS if applicable, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions