我在 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>
当我点击New Folder
按钮时,它弹出一个表格,我必须为该文件夹引入一个名称,但是如果我在表面上,我也这样做,并且在我打开屏幕键盘之后输入文本的表单移到顶部。
以下是showFileNameFlyout
功能:
$scope.showFileNameFlyout = function () {
const winControl = document.getElementById('createFolderNameFlyout').winControl;
winControl.show(document.getElementById('showAddContentMenu'), 'left', 'center');
};
有没有人知道如何解决这个问题?我希望,在我关闭屏幕键盘后,win-flyout
元素不会在顶部移动。谢谢!