Skip to content

Instantly share code, notes, and snippets.

@alvinwoon
Created October 21, 2015 02:27
Show Gist options
  • Save alvinwoon/1c4bae4568de6660d1ee to your computer and use it in GitHub Desktop.
Save alvinwoon/1c4bae4568de6660d1ee to your computer and use it in GitHub Desktop.
Searching 16927 files for "KeyboardDismiss"
/Users/alvinwoon/react/AwesomeProject/node_modules/react-native-scrollable-tab-view/examples/RugbyExample/iOS/main.jsbundle:
25034
25035
25036: keyboardDismissMode:PropTypes.oneOf([
25037 'none',
25038 'interactive',
.....
25215 ScrollViewClass = AndroidScrollView;}
25216
25217: var keyboardDismissModeConstants={
25218: 'none':RCTScrollViewConsts.KeyboardDismissMode.None,
25219: 'interactive':RCTScrollViewConsts.KeyboardDismissMode.Interactive,
25220: 'on-drag':RCTScrollViewConsts.KeyboardDismissMode.OnDrag};
25221
25222: props.keyboardDismissMode = props.keyboardDismissMode?
25223: keyboardDismissModeConstants[props.keyboardDismissMode]:undefined;}
25224
25225 invariant(
.....
25257 decelerationRate:true,
25258 horizontal:true,
25259: keyboardDismissMode:true,
25260 keyboardShouldPersistTaps:true,
25261 maximumZoomScale:true,
.....
25561 !this.state.observedScrollSinceBecomingResponder &&
25562 !this.state.becameResponderWhileAnimating){
25563: this.props.onScrollResponderKeyboardDismissed &&
25564: this.props.onScrollResponderKeyboardDismissed(e);
25565 TextInputState.blurTextInput(currentlyFocusedTextInput);}},
25566
/Users/alvinwoon/react/AwesomeProject/node_modules/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js:
76 * - 'on-drag', the keyboard is dismissed when a drag begins.
77 */
78: keyboardDismissMode: ReactPropTypes.oneOf([
79 'none', // default
80 'on-drag',
..
154 this.props.onDrawerSlide(event);
155 }
156: if (this.props.keyboardDismissMode === 'on-drag') {
157 dismissKeyboard();
158 }
/Users/alvinwoon/react/AwesomeProject/node_modules/react-native/Libraries/Components/ScrollResponder.js:
89 * this.props.onKeyboardDidShow
90 *
91: * `onScrollResponderKeyboardDismissed` will be invoked if an appropriate
92 * tap inside the scroll responder's scrollable region was responsible
93 * for the dismissal of the keyboard. There are other reasons why the
94 * keyboard could be dismissed.
95 *
96: * this.props.onScrollResponderKeyboardDismissed
97 *
98 * Standard Keyboard Hide Sequence:
..
248 !this.state.observedScrollSinceBecomingResponder &&
249 !this.state.becameResponderWhileAnimating) {
250: this.props.onScrollResponderKeyboardDismissed &&
251: this.props.onScrollResponderKeyboardDismissed(e);
252 TextInputState.blurTextInput(currentlyFocusedTextInput);
253 }
/Users/alvinwoon/react/AwesomeProject/node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js:
161 * On android this is not supported and it will have the same behavior as 'none'.
162 */
163: keyboardDismissMode: PropTypes.oneOf([
164 'none', // default
165 'interactive',
...
332 }
333 if (Platform.OS === 'android') {
334: if (this.props.keyboardDismissMode === 'on-drag') {
335 dismissKeyboard();
336 }
...
441 decelerationRate: true,
442 horizontal: true,
443: keyboardDismissMode: true,
444 keyboardShouldPersistTaps: true,
445 maximumZoomScale: true,
/Users/alvinwoon/react/AwesomeProject/node_modules/react-native/React/Views/RCTScrollView.m:
817 RCT_SET_AND_PRESERVE_OFFSET(setDecelerationRate, CGFloat)
818 RCT_SET_AND_PRESERVE_OFFSET(setDirectionalLockEnabled, BOOL)
819: RCT_SET_AND_PRESERVE_OFFSET(setKeyboardDismissMode, UIScrollViewKeyboardDismissMode)
820 RCT_SET_AND_PRESERVE_OFFSET(setMaximumZoomScale, CGFloat)
821 RCT_SET_AND_PRESERVE_OFFSET(setMinimumZoomScale, CGFloat)
/Users/alvinwoon/react/AwesomeProject/node_modules/react-native/React/Views/RCTScrollViewManager.h:
13 @interface RCTConvert (UIScrollView)
14
15: + (UIScrollViewKeyboardDismissMode)UIScrollViewKeyboardDismissMode:(id)json;
16
17 @end
/Users/alvinwoon/react/AwesomeProject/node_modules/react-native/React/Views/RCTScrollViewManager.m:
23 @implementation RCTConvert (UIScrollView)
24
25: RCT_ENUM_CONVERTER(UIScrollViewKeyboardDismissMode, (@{
26: @"none": @(UIScrollViewKeyboardDismissModeNone),
27: @"on-drag": @(UIScrollViewKeyboardDismissModeOnDrag),
28: @"interactive": @(UIScrollViewKeyboardDismissModeInteractive),
29 // Backwards compatibility
30: @"onDrag": @(UIScrollViewKeyboardDismissModeOnDrag),
31: }), UIScrollViewKeyboardDismissModeNone, integerValue)
32
33 @end
..
51 RCT_EXPORT_VIEW_PROPERTY(decelerationRate, CGFloat)
52 RCT_EXPORT_VIEW_PROPERTY(directionalLockEnabled, BOOL)
53: RCT_EXPORT_VIEW_PROPERTY(keyboardDismissMode, UIScrollViewKeyboardDismissMode)
54 RCT_EXPORT_VIEW_PROPERTY(maximumZoomScale, CGFloat)
55 RCT_EXPORT_VIEW_PROPERTY(minimumZoomScale, CGFloat)
33 matches across 7 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment