Author: pyaschenko
Date: 2010-07-30 07:21:50 -0400 (Fri, 30 Jul 2010)
New Revision: 18288
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
Log:
https://jira.jboss.org/browse/RF-8875
right,left, backspace keys fixes
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
===================================================================
---
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-29
23:17:51 UTC (rev 18287)
+++
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-30
11:21:50 UTC (rev 18288)
@@ -262,7 +262,7 @@
if (event.which == rf.KEYS.RETURN || event.type == "click") {
this.setInputValue(subValue);
} else {
- selectItem.call(this, 0, false, event.which == rf.KEYS.BACKSPACE);
+ selectItem.call(this, 0, false, event.which == rf.KEYS.BACKSPACE || event.which ==
rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT);
}
}
};
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
===================================================================
---
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-29
23:17:51 UTC (rev 18287)
+++
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-30
11:21:50 UTC (rev 18288)
@@ -135,8 +135,11 @@
//TODO: is it needed to chesk keys?
//TODO: we need to set value when autoFill used when LEFT or RIGHT was pressed
if (event.which == rf.KEYS.LEFT || event.which == rf.KEYS.RIGHT || flag) {
+ if (flag || this.isVisible) {
+ this.__onChangeValue(event);
+ }
if (flag) {
- this.__onChangeValue(event);
+ this.currentValue = this.getInputValue();
onShow.call(this, event);
}
}