It is not possible to scroll input in an ionic application when focus is on entering the phone

Predefined functionality of your phone: . When we focus on any input, it automatically scrolls this input on the mobile device.

Problem: It doesn’t work in my ionic application, due to the horizontal scrolling it is also there, so when I click on the input to the mobile device, it does not automatically scroll to this input and the input is hidden behind the keyboard.

I tried delegate-handlefor this, but it does not work.

Plunker for the same

HTML

<ion-scroll direction="xy" class="scroll" delegate-handle="nomineeDiv">
    <div class="table-row" ng-repeat="data in nominee"><!-- Multiple div show horizontally -->
        <form name="data.formName">
            <!-- Long vertical form
            .....
            .....
            after 4 input tags --> 
            <input type="text" name="something"/>
            <!-- Need to scroll to input when input focused -->
        </form>
    </div>
</ion-scroll>

Controller

$ionicScrollDelegate.$getByHandle('nomineeDiv').scrollBy(580, 140, true);
+4
source share
1

.1. , . .

.2 CSS overflow-y: scroll; .

.3 <preference name="fullscreen" value="true" /> config.xml.

, Solution.2.

-

0

Source: https://habr.com/ru/post/1671703/


All Articles