File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import 'package:flutter/rendering.dart';
10
10
import 'package:flutter/services.dart' ;
11
11
12
12
import '../common/utils/platform.dart' ;
13
+ import '../document/attribute.dart' ;
13
14
import '../document/document.dart' ;
14
15
import '../document/nodes/container.dart' as container_node;
15
16
import '../document/nodes/leaf.dart' ;
@@ -985,6 +986,13 @@ class RenderEditor extends RenderEditableContainerBox
985
986
start: localWord.start + nodeOffset,
986
987
end: localWord.end + nodeOffset,
987
988
);
989
+
990
+ // Don't change selection if the selected word is a placeholder.
991
+ if (child.container.style.attributes
992
+ .containsKey (Attribute .placeholder.key)) {
993
+ return ;
994
+ }
995
+
988
996
if (position.offset - word.start <= 1 && word.end != position.offset) {
989
997
_handleSelectionChange (
990
998
TextSelection .collapsed (offset: word.start),
You can’t perform that action at this time.
0 commit comments