mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-06 17:52:57 +08:00
Prevent crash when scrollEnabled used in singleline textinput (#23361)
Summary: Fixes #22949 , #21339. Currently, multiline textInput uses `UITextView` but singleline textInput uses `UITextField`, so singleline textinput may crash when use `scrollEnabled` property. [iOS] [Fixed] - Prevent crash when scrollEnabled used in singleline textinput Pull Request resolved: https://github.com/facebook/react-native/pull/23361 Differential Revision: D14030586 Pulled By: cpojer fbshipit-source-id: a8ae1b4e168469e65745c4d5e9329df8b6faa2aa
This commit is contained in:
committed by
Facebook Github Bot
parent
b8246ac89a
commit
9ff43abe65
@@ -87,6 +87,16 @@
|
||||
self.enabled = editable;
|
||||
}
|
||||
|
||||
- (void)setScrollEnabled:(BOOL)enabled
|
||||
{
|
||||
// Do noting, compatible with multiline textinput
|
||||
}
|
||||
|
||||
- (BOOL)scrollEnabled
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark - Context Menu
|
||||
|
||||
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
|
||||
|
||||
Reference in New Issue
Block a user