mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 03:50:11 +08:00
Fix TextInput stack overflow when pasting text in multiline input with maxlength
Summary: When pasting text longer than maxlenght, the textDidChange: call we did would end calling back into textView:shouldChange: because we saw an unexpected multi-character change. Since this is an expected mutation, update predictedText appropriately. Reviewed By: majak Differential Revision: D3561524 fbshipit-source-id: 07bb78d830ccfa3aed6ee274dc30adeadce9e1f8
This commit is contained in:
committed by
Facebook Github Bot 1
parent
55fb4f4a75
commit
23e087fc26
@@ -679,6 +679,12 @@ exports.examples = [
|
||||
keyboardType="url"
|
||||
style={[styles.multiline, styles.multilineWithFontStyles]}
|
||||
/>
|
||||
<TextInput
|
||||
placeholder="multiline text input with max length"
|
||||
maxLength={5}
|
||||
multiline={true}
|
||||
style={styles.multiline}
|
||||
/>
|
||||
<TextInput
|
||||
placeholder="uneditable multiline text input"
|
||||
editable={false}
|
||||
|
||||
Reference in New Issue
Block a user