Author: vmolotkov
Date: 2008-03-27 13:18:00 -0400 (Thu, 27 Mar 2008)
New Revision: 7316
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
Log:
http://jira.jboss.com/jira/browse/RF-2795
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
---
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27
16:59:45 UTC (rev 7315)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27
17:18:00 UTC (rev 7316)
@@ -125,6 +125,7 @@
Event.stop(event);
break;
case Event.KEY_ESC :
+ this.comboList.resetSelection();
this.comboList.hideWithDelay();
break;
}
@@ -171,14 +172,11 @@
cancel : function($super, e) {
var item = this.getLabelItem(this.valueKeeper.value);
if (item) {
- if (this.comboList.selectedItem) {
- this.comboList.doNormalItem(this.comboList.selectedItem);
- }
+ this.comboList.resetSelection();
this.comboList.doSelectItem(item);
$super(e, item.innerHTML);
this.comboList.hide();
}
- return false;
}
});
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
---
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-03-27
16:59:45 UTC (rev 7315)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-03-27
17:18:00 UTC (rev 7316)
@@ -76,5 +76,14 @@
this.doSelectItem(it);
}
}
+ },
+
+ resetSelection: function() {
+ if (this.activeItem) {
+ this.doNormalItem(this.activeItem);
+ }
+ if (this.selectedItem) {
+ this.doNormalItem(this.selectedItem);
+ }
}
});