Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 4d23d60e73..487e18bfaf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -5806,6 +5806,14 @@ void installListeners() {
addListener(SWT.Resize, listener);
addListener(SWT.Traverse, listener);
ime.addListener(SWT.ImeComposition, event -> {
+ if (!editable) {
+ event.doit = false;
+ event.start = 0;
+ event.end = 0;
+ event.text = "";
+ return;
+ }
+
switch (event.detail) {
case SWT.COMPOSITION_SELECTION: handleCompositionSelection(event); break;
case SWT.COMPOSITION_CHANGED: handleCompositionChanged(event); break;

Back to the top