Skip to content

Commit 2a5c35a

Browse files
mrpmohiburrahmanmdjastrzebski
authored andcommitted
fix: skipBlur option disables both endEditing and blur
1 parent eeff5ff commit 2a5c35a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/user-event/type/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ export async function type(
6868
dispatchEvent(element, 'submitEditing', EventBuilder.TextInput.submitEditing(finalText));
6969
}
7070

71-
dispatchEvent(element, 'endEditing', EventBuilder.TextInput.endEditing(finalText));
72-
7371
if (!options?.skipBlur) {
72+
dispatchEvent(element, 'endEditing', EventBuilder.TextInput.endEditing(finalText));
7473
dispatchEvent(element, 'blur', EventBuilder.Common.blur());
7574
}
7675
}
@@ -136,3 +135,4 @@ function isTextChangeAccepted(element: ReactTestInstance, text: string) {
136135
const maxLength = element.props.maxLength;
137136
return maxLength === undefined || text.length <= maxLength;
138137
}
138+

0 commit comments

Comments
 (0)