我的cordova应用程序中有一个输入字段。当我点击输入字段时,android会调用调整窗口大小的函数。在iOS上,一切运行正常。调整大小会产生问题,因为我有一个用epub.js呈现的文本,当单击该文本字段时,它会返回到当前章节的开头。
如何防止调整大小?
我试过了,但问题仍然存在:Click on input field triggers window resize
HTML:
<form id="realPageInputForm" ng-submit="goToRealPage(inputPage)">
<input ng-model-options="{ getterSetter: true }"
id="realPageInput"
class="inputPage input-label"
type="number"
name="inputPage"
ng-model="inputPage"
placeholder="Enter page here">
</form>发布于 2017-09-25 19:28:23
这是因为当你点击输入时,键盘会出现,在android中,键盘会让你视图变小(屏幕尺寸在你的应用程序和键盘之间共享);当键盘隐藏时,网页视图又会恢复到原来的大小。你可以查看与你的问题类似的其他答案,比如PhoneGap: Is there a way to stop the keyboard from resizing the view?。
https://stackoverflow.com/questions/41464434
复制相似问题