[英]Remove highlighting from extjs combobox after selection
First of all, you really need to consider upgrading your ExtJS version. 首先,您确实需要考虑升级ExtJS版本。 I haven't seen this behavior by default in the newer versions.
默认情况下,我在新版本中没有看到此行为。
Looking at the docs , in the config phase i don't see anythin which can help you. 看文档 ,在配置阶段,我看不到任何可以帮助您的东西。
The simplest thing you can do is add a select
listener where you call the selectText
method 您可以做的最简单的事情是添加一个
select
侦听器,在其中调用selectText
方法
comboBox.on('select', function(combo,record,index) {
// set the cursor at the start
//comboBox.selectText(0,0);
var cursorEnd =combo.getValue().length;
comboBox.selectText(cursorEnd,cursorEnd);
});
See working example with jsfiddle . 请参阅jsfiddle的工作示例 。 It uses a newer ExtJS for illustrative purposes, however the select event and selectText method are also available in ExtJS 2.3.
它出于说明目的使用了较新的ExtJS,但是在ExtJS 2.3中也可以使用select事件和selectText方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.