Author: vmolotkov
Date: 2008-07-31 04:21:17 -0400 (Thu, 31 Jul 2008)
New Revision: 9836
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
https://jira.jboss.org/jira/browse/RF-4062
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-07-31
08:12:37 UTC (rev 9835)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-07-31
08:21:17 UTC (rev 9836)
@@ -27,6 +27,7 @@
this.comboList.listParent.observe("mousedown",
function(e){this.listMousedownHandler(e);}.bindAsEventListener(this));
this.comboList.listParent.observe("mousemove",
function(e){this.listMouseMoveHandler(e)}.bindAsEventListener(this));
this.comboList.listParent.observe("click",
function(e){this.listClickHandler(e);}.bindAsEventListener(this));
+ this.comboList.listParent.observe("mouseup",
function(e){this.listMouseUpHandler(e);}.bindAsEventListener(this));
},
setInputWidth : function($super, textSize) {
@@ -138,6 +139,15 @@
}
},
+ listMouseUpHandler : function(e) {
+ if (window.getSelection) {
+ if (window.getSelection().getRangeAt(0).toString() != '') {
+ this.tempValueKeeper.focus();
+ this.comboList.isList = false;
+ }
+ }
+ },
+
tmpValueKeyDownHandler : function(event) {
switch (event.keyCode) {
case Event.KEY_RETURN :