Shahar Havivi has uploaded a new change for review.

Change subject: ui: EntityModelTextAreaEditor - fix selection-text with Enter
......................................................................

ui: EntityModelTextAreaEditor - fix selection-text with Enter

Wrong behaviour for the control if user will select text and will press
enter.
This issue is cause because the dialog is capturing the enter key to
submit the dialog selection.

https://bugzilla.redhat.com/1109330
Signed-off-by: Shahar Havivi <[email protected]>
Change-Id: If7647e1e52f29be7f0632a330013da61cc1f503d
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/EntityModelTextAreaEditor.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/14/28814/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/EntityModelTextAreaEditor.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/EntityModelTextAreaEditor.java
index 8e54592..fc5fa30 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/EntityModelTextAreaEditor.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/EntityModelTextAreaEditor.java
@@ -27,7 +27,7 @@
                 super.enterPressed();
                 int pos = getContentWidget().getCursorPos();
                 
getContentWidget().setText(getContentWidget().getText().substring(0, pos) + '\n'
-                        + getContentWidget().getText().substring(pos)); 
//$NON-NLS-1$
+                        + getContentWidget().getText().substring(pos + 
getContentWidget().getSelectionLength())); //$NON-NLS-1$
                 getContentWidget().setCursorPos(pos + 1);
             }
         };


-- 
To view, visit http://gerrit.ovirt.org/28814
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7647e1e52f29be7f0632a330013da61cc1f503d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to