Author: pyaschenko
Date: 2010-07-30 07:40:03 -0400 (Fri, 30 Jul 2010)
New Revision: 18289
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
Log:
https://jira.jboss.org/browse/RF-8875
bug 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-30
11:21:50 UTC (rev 18288)
+++
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-30
11:40:03 UTC (rev 18289)
@@ -307,9 +307,9 @@
var afterCursorStr = inputValue.substring(cursorPosition);
var pos = beforeCursorStr.search(REGEXP_TOKEN_LEFT);
- var startPos = pos!=-1 ? pos : 0;
+ var startPos = pos!=-1 ? pos : beforeCursorStr.length;
pos = afterCursorStr.search(REGEXP_TOKEN_RIGHT);
- var endPos = pos!=-1 ? pos : inputValue.length;
+ var endPos = pos!=-1 ? pos : afterCursorStr.length;
var beginNewValue = inputValue.substring(0, startPos) + value;
cursorPosition = beginNewValue.length;