A bug about RecipientEditTextView
- Steps to reproduce the problem.
Pre-condition:the threshold of the RecipientEditTextView is set to 1.
Step1: type chars and select a item from the dropdown listitem
Step2: type "," or ";". - What happened.
The first position item of the previous dropdown list which showing in step1 is submitted to the RecipientEditTextView. - What you think the correct behavior should be.
The char "," or ";" should be submitted to the RecipiemtnEditTextView. I think the point is the Threshold of the RecipientEditTextView is set to 1, and the following code snippet is where cause the issue: private boolean commitChip(int start, int end, Editable editable) {
ListAdapter adapter = getAdapter();
if (adapter != null && adapter.getCount() > 0 && enoughToFilter()
&& end == getSelectionEnd() && !isPhoneQuery()) {
// choose the first entry.
submitItemAtPosition(0);
dismissDropDown();
return true;
} else { the if condition should be modified like this: private boolean commitChip(int start, int end, Editable editable) {
ListAdapter adapter = getAdapter();
if (adapter != null && adapter.getCount() > 0 && enoughToFilter()
&& end == getSelectionEnd() && !isPhoneQuery()
/*The dropdown listitem should only be submitted when the PopupWindow is showing.To prevent the below case happening:
When a dropdown listitem has been submitted, and the getThreshold()==1, and the input char is a single COMMIT char,
such as ',' or ';', the first position item of the previous list will be submitted to the EditText */
&& isPopupShowing()) {
// choose the first entry.
submitItemAtPosition(0);
dismissDropDown();
return true;
} else { https://code.google.com/p/android/issues/detail?id=73076
A bug about RecipientEditTextView的更多相关文章
- Tomcat一个BUG造成CLOSE_WAIT
之前应该提过,我们线上架构整体重新架设了,应用层面使用的是Spring Boot,前段日子因为一些第三方的原因,略有些匆忙的提前开始线上的内测了.然后运维发现了个问题,服务器的HTTPS端口有大量的C ...
- a标签点击跳转失效--IE6、7的奇葩bug
一般运用a标签包含img去实现点击图片跳转的功能,这是前端经常要用到的东西. 今天遇到个神奇的bug:如果在img上再包裹一层div,而且div设置了width和height,则图片区域点击时,无任何 ...
- 关于 Chrome 浏览器中 onresize 事件的 Bug
我在写插件时用到了 onresize 事件,在反复地测试后发现该事件在 Chrome 及 Opera(内核基本与 Chrome 相同,以下统称 Chrome)浏览器打开时就会执行,这种情况也许不能算作 ...
- Chrome出了个小bug:论如何在Chrome下劫持原生只读对象
Chrome出了个小bug:论如何在Chrome下劫持原生只读对象 概述 众所周知,虽然JavaScript是个很灵活的语言,浏览器里很多原生的方法都可以随意覆盖或者重写,比如alert.但是为了保证 ...
- 一个粗心的Bug,JSON格式不规范导致AJAX错误
一.事件回放 今天工作时碰到了一个奇怪的问题,这个问题很早很早以前也碰到过,不过没想到过这么久了竟然又栽在这里. 当时正在联调一个项目,由于后端没有提供数据接口,于是我直接本地建立了一个 json ...
- 了不起的 nodejs-TwitterWeb 案例 bug 解决
了不起的nodejs算是一本不错的入门书,不过书中个别案例存在bug,按照书中源码无法做出和书中相同效果,原本兴奋的心情掺杂着些许失落. 现在我们看一下第七章HTTP,一个Twitter Web客户端 ...
- 应该是Angular2的一个bug?
为了应对未来的趋势,及时赶上下一趟互联网技术,我最近也在通过具体项目研究angular2,首先必须要吐槽的是,学习angular2的成本本身不高,但是一堆的工具.配置实在让人 很是焦灼,就像asp.n ...
- 记录一次bug解决过程:数据迁移
一 总结 不擅长语言表达,勤于沟通,多锻炼 调试MyBatis中SQL语法:foreach 问题:缺少关键字VALUES.很遗憾:它的错误报的让人找不着北. 二 BUG描述:MyBatis中批量插入数 ...
- 关于MJRefresh的下拉加载数据bug
当没有更多数据的时候显示NoMoreData 我的理解是先结束刷新再显示没有更多 今天之前一直没发现有问题 贴之前的代码 [self.collectionView reloadData]; [self ...
随机推荐
- AtCoder - 2568 最小割
There is a pond with a rectangular shape. The pond is divided into a grid with H rows and W columns ...
- Qt 学习之路 2(76):QML 和 QtQuick 2
Home / Qt 学习之路 2 / Qt 学习之路 2(76):QML 和 QtQuick 2 Qt 学习之路 2(76):QML 和 QtQuick 2 豆子 2013年12月18日 Qt ...
- Python web前端 06 运算符 循环
Python web前端 06 运算符 循环 一.运算符 #JS六大数据类型 #number 数字 #string 字符串 #boolean 布尔型 #function 函数 #undefined 未 ...
- 下载 生成 requirements
生成你项目的所有 组件,模块 pip3 freeze > requirements.txt 下载requirements.txt 里的所有 模块 pip3 install -r requirem ...
- [转] Spring Boot配置多个DataSource
[From] https://www.liaoxuefeng.com/article/001484212576147b1f07dc0ab9147a1a97662a0bd270c20000 Sprin ...
- 从fis中得来的数据结构,Object版,
/* * config * caoke */ 'use strict'; //You can't use merge in util.js function merge(source, target) ...
- python 可迭代对象,迭代器和生成器,lambda表达式
分页查找 #5.随意写一个20行以上的文件(divmod) # 运行程序,先将内容读到内存中,用列表存储. # l = [] # 提示:一共有多少页 # 接收用户输入页码,每页5条,仅输出当页的内容 ...
- redis cluster 集群部署
准备工作 1. 安装docker curl -s https://get.docker.com/ | sh 注:一键安装的事最新版docker.已安装docker可跳过此步骤 2. 获取基础镜像 do ...
- PIE SDK波谱运算
1.算法功能简介 波谱运算(Spectral Math)是一种灵活的波谱处理工具,可以用数学表达式或IDL程序对波谱曲线(以及选择的多波段图像)进行处理.波谱曲线可以来自一幅多波段图像的Z剖面.波谱库 ...
- Flask中的的SQLAlchemy2
昨天更新了博客不知对各位职场的大佬有没有帮助,如果没有看到的请用小手狠狠地戳这里 Flask中的的SQLAlchemy 今天呢,我们来说一下多对多表的关系,知道不?开始之前我先说一个事,昨晚更新了博客 ...