关于安卓2.0左右webapp中input不能输入中文的bug - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
squallsdjl
V2EX    问与答

关于安卓2.0左右webapp中input不能输入中文的bug

  •  
  •   squallsdjl 2013-05-22 22:01:37 +08:00 4645 次点击
    这是一个创建于 4593 天前的主题,其中的信息可能已经有所发展或是发生改变。
    目前系统为2.3,为web站点
    我在fixed的顶部banner中加了一个absolute的a按钮,点击按钮之后用translate移入左侧fixed的div。
    而这个点击触发的事件竟然会影响遥远的一个input元素不能输入中文,英文可以输入,NND,我凌乱了。
    以下是我搜索到的一些参考,但是没有解决我遇到的问题,和大家一起学习了。。如果有相关朋友能够提供一点建议,不甚感激 TAT
    -----------------
    The issue is you can not change keyboards due to a bug in Webkit browsers when -webkit-transform is applied

    Yep - Long story short, it's a combination bug between Webkit and NoClickDelay I was using. I finally had time to sit back and step through and remove a lot of "fixing" code and resolve this.

    -------------------
    Android 2.2/2.3’s implementation of position: fixed; can, in conjunction with seemingly unrelated styles and markup patterns, cause a number of strange issuesparticularly in the case of position: absolute elements inside of position: fixed elements. These bizarre issues includebut are not limited tothe following:

    Form elements elsewhere on the pageselect menus in particularcan fail to respond to user interaction when an empty absolute positioned element is placed within a fixed position element. In rare casesand specific to Android 2.2this can cause entire pages to fail to respond to user interaction. This can seemingly be solved by adding any character to the absolute positioned element, including a non-breaking space, and in some cases even whitespace.
    The above-described issue can also be triggered by an absolute positioned image inside of a fixed position element, but only when that image is using something other than its inherent dimensions. If a height or width is specified on the image using CSS, or the image src is invalid (thus having no inherent height and width), this issue can occur. If an image that is inherently, say, 50x50 pixels is placed in a fixed element and left at its inherent dimensions, this issue does not seem to occur.
    When a position: fixed element appears anywhere on a page, most 2D CSS transforms will fail. Oddly, only translate transforms seem uneffected by this. Even more oddly, this issue is solved by setting a CSS opacity of .9 or below on the parent of the fixed element.
    Combinations position: fixed and overflow properties are best avoided, as both have been known to cause unpredictable issues in older versions of Android OS.
    Any element that triggers the on-screen keyboard, when placed inside a position: fixed element, will fail to respond to user input when using anything other than the default keyboard. This includes Swype, XT9 or, it seems, any input method apart from the standard non-predictive keyboard.
    4 条回复    1970-01-01 08:00:00 +08:00
    xiaotest
        1
    xiaotest  
       2014-04-04 01:03:19 +08:00
    遇到一模一样的问题~
    请问最后是如何解决的?
    squallsdjl
        2
    squallsdjl  
    OP
       2014-04-06 20:51:57 +08:00   1
    @xiaotest 解决的过程很恶心,判断安卓低端设备上,把fixed的CSS降级交互为absolute,没有其他办法吧。技术更新太快。。。。很多站点现在慢慢的都开始放弃低版本操作系统用户了。。。不过IE8+还是要考虑下。。。
    xiaotest
        3
    xiaotest  
       2014-04-12 15:02:02 +08:00
    @squallsdjl 我现在目标用户都是移动端的。做的是微信内应用,考虑到android 2.3还是不少……我来试试你提供的这个方法
    squallsdjl
        4
    squallsdjl  
    OP
       2014-04-14 16:48:10 +08:00
    @xiaotest 是吧,如果十分关键就临时处理一下吧,作好补丁记录就好~不过好歹是不用怎么考虑旧版本的IE。。。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3851 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 29ms UTC 00:58 PVG 08:58 LAX 16:58 JFK 19:58
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86