mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix TextInput Spannable flags
Summary: The TextInput spannables are being set wrong by Nodes. Consequently, when you hit space after a word, anything you type is highlighted, though it shouldn't be. Differential Revision: D3507516
This commit is contained in:
@@ -59,17 +59,25 @@ import com.facebook.react.uimanager.ReactShadowNode;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* package */ boolean isEditable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively visits FlatTextShadowNode and its children,
|
||||
* applying spans to SpannableStringBuilder.
|
||||
*/
|
||||
/* package */ final void applySpans(SpannableStringBuilder builder) {
|
||||
/* package */ final void applySpans(SpannableStringBuilder builder, boolean isEditable) {
|
||||
if (mTextBegin != mTextEnd || shouldAllowEmptySpans()) {
|
||||
performApplySpans(builder, mTextBegin, mTextEnd);
|
||||
performApplySpans(builder, mTextBegin, mTextEnd, isEditable);
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void performCollectText(SpannableStringBuilder builder);
|
||||
protected abstract void performApplySpans(SpannableStringBuilder builder, int begin, int end);
|
||||
protected abstract void performApplySpans(
|
||||
SpannableStringBuilder builder,
|
||||
int begin,
|
||||
int end,
|
||||
boolean isEditable);
|
||||
protected abstract void performCollectAttachDetachListeners(StateBuilder stateBuilder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user