在IOS设备中单击Go按钮时不激活Form标签内的文本框 [英] Text box inside a Form tag not firing on Go button click in IOS devices

查看:72
本文介绍了在IOS设备中单击Go按钮时不激活Form标签内的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于实现网站搜索的表单标签内的文本框,在文本框中输入文本后我的问题和在Android设备页面重定向中单击转到按钮发生并显示搜索结果,但在IOS设备中回发未发生我的代码是如下所示



 <  表格    id   =  search-wrap    class  < span class =code-keyword> =  ezsearch-summary   方法  = 获取    action   =  / ezSearch    target   =  _ blank >  

< 输入 id = Text1 class = search-input name = q type = text value = autocomplete = off / >
< / form >

解决方案

不确定这是否是您的确切问题,但MS和Apple之间存在一个错误 - 当他们在iOS8上更新Safari时,他们将版本提升为Webkit 600,但是代码在。 NET正在寻找浏览器功能搞砸了,只看前两个数字,所以它看到的是Webkit 60。因此,Ajax控件不认为浏览器支持回调并且不再使用它。



修复相对简单 - 我们需要覆盖浏览器功能web.config - 将其添加到System.Web



 <   browsercaps  >  
< 过滤器 >
< case match = AppleWebKit >
EcmaScriptVersion = 1.5
supportsCallback = true
< / case >
< / filter >
< / browsercaps >





这不是唯一的解决方案,但是当我们今年早些时候遇到类似的问题时,这是最方便的。



参考文献: http://www.brillianceweb.com/blog/article/69/aspnet-20-misidentifies-safari-71-on-ios-and-os-x#sthash.0FuAyobK.dpbs


I have a textbox inside a form tag for implementing site search, My problem after entering text in textbox and On clicking go button in android devices page redirection occures and search result is displayed, but in IOS devices postback not occuring My code is shown below

<form id="search-wrap" class="ezsearch-summary" method="get" action="/ezSearch" target="_blank">

                        <input id="Text1" class="search-input" name="q" type="text" value="" autocomplete="off"/>
                    </form>

解决方案

Not sure if this is your exact problem but there's a bug somewhere between MS and Apple – when they updated Safari on iOS8 they bumped the version to be Webkit 600, but the code in .NET that’s looking for the browser capabilities screws up and only looks at the first two numbers, so it’s seeing "Webkit 60" instead. The Ajax controls therefore don’t think the browser supports the callbacks and falls back to not using it.

Fix is relatively simple – we need to override the browser capabilities in the web.config – add this to System.Web

<browsercaps>
      <filter>
            <case match="AppleWebKit">
                  EcmaScriptVersion = 1.5
                  supportsCallback = true
            </case>
      </filter>
</browsercaps>



This isn't the only solution, but was the most expedient for us when we encountered a similar problem earlier this year.

References:
http://www.brillianceweb.com/blog/article/69/aspnet-20-misidentifies-safari-71-on-ios-and-os-x#sthash.0FuAyobK.dpbs


这篇关于在IOS设备中单击Go按钮时不激活Form标签内的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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