iOS Safari输入文字消失 [英] ios safari input text disappearing

查看:135
本文介绍了iOS Safari输入文字消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Safari浏览器中输入时遇到了一个奇怪的问题 如此处所示.

I am having a strange problem with input in ios safari as shown here.

输入是angular应用程序的一部分,对ng-length和ng-pattern有一些基本检查.最初,当您键入所有字符时,都会显示出来,但是如果您稍微浏览一下页面,例如点击,向上滚动和向下滚动,然后再次点击,则只显示您键入的前两个字母,其余的将显示看不见,但光标仍会移动.

The input is part of an angular app and has some basic checks for ng-length and ng-pattern. Initially as you type all the characters are showed, but if you play around with the page a bit, like tapping out, scrolling up and down, then tapping in again only the first 2 letters of what you type will show and the rest will be invisible, but the cursor will still move.

输入内容也使用自定义网络字体,但是删除它并不能解决问题.

The input also uses a custom web font, but removing it did not fix the problem.

这是一个已知的错误,是否有解决方法?

Is this a known bug and is there a workaround?

推荐答案

我发现了我的问题:将iframe定位为绝对的,隐藏的,我从中监听调整大小事件,以此作为监视div宽度的解决方案.移除位置:绝对固定.

I found my problem: an iframe being positioned absolute, hidden, from which I listen to the resize event as a solution of monitoring a div width. Removing position:absolute from it fixed it.

这篇关于iOS Safari输入文字消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆