The text input window moves up after using the on-screen keyboard on the surface

I have the following code in WinJS :

<win-menu id="showAddContentMenu"
          anchor="'#showAddContentMenuCommand'">
    <win-menu-command label="::'newFolder' | translate"
                      ng-click="showFileNameFlyout()"
                      id="newFolderCommand">
    </win-menu-command>
    <win-menu-command label="::'uploadContent' | translate"
                      ng-click="uploadFile()">
    </win-menu-command>
</win-menu>

<win-flyout id="createFolderNameFlyout"
            anchor="'#newFolderCommand'">
    <form ng-submit="createNewFolder(addContent.folderName);hideFileNameFlyout();">
        <input type="text"
               ng-model="addContent.folderName" />
        <button class="btn-green"
                type="submit"
                ng-disabled="addContent.folderName.length === 0"
                ng-bind="'create' | translate">
        </button>
    </form>
</win-flyout>

When I press the button New Folder, a pop-up form appears where I need to enter a name for the folder, but if I’m on the surface and I do the same, and after I open the on-screen keyboard, the text entry moves to the beginning.

Here is the function showFileNameFlyout:

 $scope.showFileNameFlyout = function () {
     const winControl = document.getElementById('createFolderNameFlyout').winControl;
     winControl.show(document.getElementById('showAddContentMenu'), 'left', 'center');
 };

Does anyone have an idea how to solve this? I want the item to win-flyoutnot move on top after closing the on-screen keyboard . Thanks!

+6
source share

All Articles