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!