当软键可见时,不能点击按钮

编程入门 行业动态 更新时间:2024-10-24 15:16:09
本文介绍了当软键可见时,不能点击按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

解决方案

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

该页面可以在 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 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!

更多推荐

当软键可见时,不能点击按钮

本文发布于:2023-06-09 04:11:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/594975.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!