6

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 click the New Folder button it pops up a form where I have to introduce a name for the folder, but if I am on a surface and I do the same and after I open on-screen keyboard the form for inputting text is moved to the top.

Here is the showFileNameFlyout function:

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

Does anyone have an idea how to solve that? I want, after I close on screen keyboard, the win-flyout element not to move on the top. Thanks!

9
  • which version of winjs are you using? And it would be much helpful if you can share a basic demo that can reproduce the problem. Commented Nov 2, 2017 at 5:20
  • @ElvisXia-MSFT Windows Library for JavaScript 2.0 Commented Nov 2, 2017 at 8:13
  • I mean a sample project. Not sample video. Commented Nov 2, 2017 at 8:34
  • can you try putting events like show or focus to input in setTimeout once and check? this is not fix. if it's fixing your issue then will tell you the next proper fix. Commented Nov 3, 2017 at 9:33
  • @MehulJoshi I will try Commented Nov 3, 2017 at 9:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.