当软键可见时,不能点击按钮 [英] Can't click button when soft-keyboard is visible

查看:148
本文介绍了当软键可见时,不能点击按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当文本输入元素具有焦点(并且软键盘可见)时,我无法直接点击提交按钮(清晰可见)。我必须首先关闭键盘(通过点击别处或键盘上的完成),然后单击提交按钮。



这是令人困惑的行为。当键盘可见时,我已经考虑彻底删除登录按钮,但这太混乱了(用户不知道他们可以点击开始,或者会令登录按钮不再消失)。 / p>

这只发生在iOS上(不知道它是否仅限于iOS 7,但怀疑它可能是),并且我正在使用Telirik AppBuilder来开发我的应用程序。

解决方案

因为我使用的是< button> 不是必需的。现在我已经为< table> (在< td> >标记内进行了全部更改,但可能是< div> ),并在图标中加入< img> 标签。为了使表格看起来更像一个按钮,有一个用于颜色/边框的CSS类。提交区域位于顶部(太)。



该页面可以在 http://ask.stroudvoices.co.uk/



似乎Android(假设iPad等)按钮作为另一种< input> ,而< table> 被视为 < body>



有时会有一个简单的答案,来自旧技术!

When an text input element has focus (and the soft keyboard is visible), I can't click the submit button (which is clearly visible) directly. I have to first dismiss the keyboard (by clicking elsewhere or on "Done" on the keyboard), and then click the submit button.

This is confusing behaviour. I have considered removing the log-in button altogether when the keyboard is visible, but that would be too confusing (for users wouldn't know that they could click "Go", or will be annoyed that the login button keeps disappearing).

This only happens on iOS (not sure if its restricted to iOS 7, but suspect it might be), and I'm using Telirik AppBuilder for my app.

解决方案

Because I was using <button> tag the soft keyboard popped up when not required. I have now changed all for <table> (inside a <td> tag, but could be a <div> ) with an <img> tag inside for the icons. To make the table look more like a button there is a CSS class for colours/borders. A submit area is right at the top (too).

The page can be inspected at http://ask.stroudvoices.co.uk/

It would seem that Android (assume iPad etc also) treat buttons as another kind of <input>, whereas <table> is regarded as <body>.

Sometimes there is a simple answer, from old technology!

这篇关于当软键可见时,不能点击按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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