Skip to content

Commit 89547e5

Browse files
committed
Disable autoFocus for text fields in preview mode.
1 parent bef57c5 commit 89547e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/transformers/node_transformers/passive_text_field_transformer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class _PassiveTextFieldWidgetState extends State<PassiveTextFieldWidget> {
233233
field = TextField(
234234
focusNode: _focusNode,
235235
autocorrect: widget.node.properties.autoCorrect,
236-
autofocus: widget.node.properties.autoFocus,
236+
autofocus: !widget.settings.isPreview && widget.node.properties.autoFocus,
237237
enableInteractiveSelection:
238238
widget.node.properties.enableInteractiveSelection,
239239
enabled: enabled,

0 commit comments

Comments
 (0)