forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextInput multiline={true} scrollEnabled={false} not working #925
Labels
Comments
Looks like a valid bug we can look into after the 0.66 migration into our fork. |
shwanton
pushed a commit
to shwanton/react-native-macos
that referenced
this issue
Jul 8, 2022
Summary: # Context RN iOS supports disabling scrolling via `scrollEnabled` prop for multiline text inputs. https://reactnative.dev/docs/0.68/textinput#scrollenabled-ios This does [not work](microsoft#925) on MacOS Since MacOS does not use `UITextView` which inherits from `UIScrollView`, the view manager property was set but not actually passed down to the underlying scroll view. `RCTMultilineTextInputView` creates a `RCTUIScrollView` which is where we need to disable scrolling. https://www.internalfb.com/code/archon_react_native_macos/[fde4113acd89fb13ee11636c48b59eac49c21bae]/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m?lines=31 `RCTUIScrollView` inherits from `NSScrollView` which does not have a `scrollEnabled` property, but there is an api we can use to disable scrolling when the property is set. https://developer.apple.com/documentation/appkit/nsscrollview/1403494-scrollwheel # Usage NOTE: Only works with `multiline={true}` ``` <TextInput multiline={true} scrollEnabled={false} ... /> ``` # Change * Only expose the `scrollEnabled` property on `RCTMultilineTextInputView`. * `RCTSinglelineTextInputView` does not have scrolling so this property is unused. * `RCTMultilineTextInputView` delegates the `scrollEnabled` to it's underlying `_scrollView` * `RCTUIScrollView` defaults initial `scrollEnabled` to `YES` * `RCTUIScrollView` disables scrolling when the `scrollEnabled` is `NO`
4 tasks
shwanton
pushed a commit
to shwanton/react-native-macos
that referenced
this issue
Jul 12, 2022
Summary: # Context RN iOS supports disabling scrolling via `scrollEnabled` prop for multiline text inputs. https://reactnative.dev/docs/0.68/textinput#scrollenabled-ios This does [not work](microsoft#925) on MacOS Since MacOS does not use `UITextView` which inherits from `UIScrollView`, the view manager property was set but not actually passed down to the underlying scroll view. `RCTMultilineTextInputView` creates a `RCTUIScrollView` which is where we need to disable scrolling. https://www.internalfb.com/code/archon_react_native_macos/[fde4113acd89fb13ee11636c48b59eac49c21bae]/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m?lines=31 `RCTUIScrollView` inherits from `NSScrollView` which does not have a `scrollEnabled` property, but there is an api we can use to disable scrolling when the property is set. https://developer.apple.com/documentation/appkit/nsscrollview/1403494-scrollwheel # Usage NOTE: Only works with `multiline={true}` ``` <TextInput multiline={true} scrollEnabled={false} ... /> ``` # Change * Only expose the `scrollEnabled` property on `RCTMultilineTextInputView`. * `RCTSinglelineTextInputView` does not have scrolling so this property is unused. * `RCTMultilineTextInputView` delegates the `scrollEnabled` to it's underlying `_scrollView` * `RCTUIScrollView` defaults initial `scrollEnabled` to `YES` * `RCTUIScrollView` disables scrolling when the `scrollEnabled` is `NO`
christophpurrer
pushed a commit
to christophpurrer/react-native-macos
that referenced
this issue
Aug 9, 2022
Summary: # Context RN iOS supports disabling scrolling via `scrollEnabled` prop for multiline text inputs. https://reactnative.dev/docs/0.68/textinput#scrollenabled-ios This does [not work](microsoft#925) on MacOS Since MacOS does not use `UITextView` which inherits from `UIScrollView`, the view manager property was set but not actually passed down to the underlying scroll view. `RCTMultilineTextInputView` creates a `RCTUIScrollView` which is where we need to disable scrolling. https://www.internalfb.com/code/archon_react_native_macos/[fde4113acd89fb13ee11636c48b59eac49c21bae]/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m?lines=31 `RCTUIScrollView` inherits from `NSScrollView` which does not have a `scrollEnabled` property, but there is an api we can use to disable scrolling when the property is set. https://developer.apple.com/documentation/appkit/nsscrollview/1403494-scrollwheel # Usage NOTE: Only works with `multiline={true}` ``` <TextInput multiline={true} scrollEnabled={false} ... /> ``` # Change * Only expose the `scrollEnabled` property on `RCTMultilineTextInputView`. * `RCTSinglelineTextInputView` does not have scrolling so this property is unused. * `RCTMultilineTextInputView` delegates the `scrollEnabled` to it's underlying `_scrollView` * `RCTUIScrollView` defaults initial `scrollEnabled` to `YES` * `RCTUIScrollView` disables scrolling when the `scrollEnabled` is `NO` Test Plan: ## Zeratul ``` MDSTextInput {...textInputProps} {...(IS_MAC ? {multiline: true, blurOnSubmit: true, scrollEnabled: false} : {})} // workaround for T110399243 ``` |before|after| | https://pxl.cl/27gQp|https://pxl.cl/27gQr| ## RN Tester |before|after| |https://pxl.cl/27gRd|https://pxl.cl/27gRh| Reviewers: lyahdav, ericroz, ackchiu, #seller_expansion Reviewed By: lyahdav Differential Revision: https://phabricator.intern.facebook.com/D37659010 Tasks: T120776572 Tags: marketplace, marketplace_seller_expansion # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m # Libraries/Text/TextInput/RCTBaseTextInputViewManager.m # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # React/Base/RCTUIKit.h # React/Base/macOS/RCTUIKit.m
christophpurrer
pushed a commit
to christophpurrer/react-native-macos
that referenced
this issue
Aug 9, 2022
Summary: # Context RN iOS supports disabling scrolling via `scrollEnabled` prop for multiline text inputs. https://reactnative.dev/docs/0.68/textinput#scrollenabled-ios This does [not work](microsoft#925) on MacOS Since MacOS does not use `UITextView` which inherits from `UIScrollView`, the view manager property was set but not actually passed down to the underlying scroll view. `RCTMultilineTextInputView` creates a `RCTUIScrollView` which is where we need to disable scrolling. https://www.internalfb.com/code/archon_react_native_macos/[fde4113acd89fb13ee11636c48b59eac49c21bae]/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m?lines=31 `RCTUIScrollView` inherits from `NSScrollView` which does not have a `scrollEnabled` property, but there is an api we can use to disable scrolling when the property is set. https://developer.apple.com/documentation/appkit/nsscrollview/1403494-scrollwheel # Usage NOTE: Only works with `multiline={true}` ``` <TextInput multiline={true} scrollEnabled={false} ... /> ``` # Change * Only expose the `scrollEnabled` property on `RCTMultilineTextInputView`. * `RCTSinglelineTextInputView` does not have scrolling so this property is unused. * `RCTMultilineTextInputView` delegates the `scrollEnabled` to it's underlying `_scrollView` * `RCTUIScrollView` defaults initial `scrollEnabled` to `YES` * `RCTUIScrollView` disables scrolling when the `scrollEnabled` is `NO` Test Plan: ## Zeratul ``` MDSTextInput {...textInputProps} {...(IS_MAC ? {multiline: true, blurOnSubmit: true, scrollEnabled: false} : {})} // workaround for T110399243 ``` |before|after| | https://pxl.cl/27gQp|https://pxl.cl/27gQr| ## RN Tester |before|after| |https://pxl.cl/27gRd|https://pxl.cl/27gRh| Reviewers: lyahdav, ericroz, ackchiu, #seller_expansion Reviewed By: lyahdav Differential Revision: https://phabricator.intern.facebook.com/D37659010 Tasks: T120776572 Tags: marketplace, marketplace_seller_expansion # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m # Libraries/Text/TextInput/RCTBaseTextInputViewManager.m # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # React/Base/RCTUIKit.h # React/Base/macOS/RCTUIKit.m
christophpurrer
pushed a commit
to christophpurrer/react-native-macos
that referenced
this issue
Aug 10, 2022
Summary: # Context RN iOS supports disabling scrolling via `scrollEnabled` prop for multiline text inputs. https://reactnative.dev/docs/0.68/textinput#scrollenabled-ios This does [not work](microsoft#925) on MacOS Since MacOS does not use `UITextView` which inherits from `UIScrollView`, the view manager property was set but not actually passed down to the underlying scroll view. `RCTMultilineTextInputView` creates a `RCTUIScrollView` which is where we need to disable scrolling. https://www.internalfb.com/code/archon_react_native_macos/[fde4113acd89fb13ee11636c48b59eac49c21bae]/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m?lines=31 `RCTUIScrollView` inherits from `NSScrollView` which does not have a `scrollEnabled` property, but there is an api we can use to disable scrolling when the property is set. https://developer.apple.com/documentation/appkit/nsscrollview/1403494-scrollwheel # Usage NOTE: Only works with `multiline={true}` ``` <TextInput multiline={true} scrollEnabled={false} ... /> ``` # Change * Only expose the `scrollEnabled` property on `RCTMultilineTextInputView`. * `RCTSinglelineTextInputView` does not have scrolling so this property is unused. * `RCTMultilineTextInputView` delegates the `scrollEnabled` to it's underlying `_scrollView` * `RCTUIScrollView` defaults initial `scrollEnabled` to `YES` * `RCTUIScrollView` disables scrolling when the `scrollEnabled` is `NO` Test Plan: ## Zeratul ``` MDSTextInput {...textInputProps} {...(IS_MAC ? {multiline: true, blurOnSubmit: true, scrollEnabled: false} : {})} // workaround for T110399243 ``` |before|after| | https://pxl.cl/27gQp|https://pxl.cl/27gQr| ## RN Tester |before|after| |https://pxl.cl/27gRd|https://pxl.cl/27gRh| Reviewers: lyahdav, ericroz, ackchiu, #seller_expansion Reviewed By: lyahdav Differential Revision: https://phabricator.intern.facebook.com/D37659010 Tasks: T120776572 Tags: marketplace, marketplace_seller_expansion # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m # Libraries/Text/TextInput/RCTBaseTextInputViewManager.m # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # React/Base/RCTUIKit.h # React/Base/macOS/RCTUIKit.m
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
shwanton
pushed a commit
to shwanton/react-native-macos
that referenced
this issue
Feb 13, 2023
Summary: # Context RN iOS supports disabling scrolling via `scrollEnabled` prop for multiline text inputs. https://reactnative.dev/docs/0.68/textinput#scrollenabled-ios This does [not work](microsoft#925) on MacOS Since MacOS does not use `UITextView` which inherits from `UIScrollView`, the view manager property was set but not actually passed down to the underlying scroll view. `RCTMultilineTextInputView` creates a `RCTUIScrollView` which is where we need to disable scrolling. https://www.internalfb.com/code/archon_react_native_macos/[fde4113acd89fb13ee11636c48b59eac49c21bae]/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m?lines=31 `RCTUIScrollView` inherits from `NSScrollView` which does not have a `scrollEnabled` property, but there is an api we can use to disable scrolling when the property is set. https://developer.apple.com/documentation/appkit/nsscrollview/1403494-scrollwheel # Usage NOTE: Only works with `multiline={true}` ``` <TextInput multiline={true} scrollEnabled={false} ... /> ``` # Change * Only expose the `scrollEnabled` property on `RCTMultilineTextInputView`. * `RCTSinglelineTextInputView` does not have scrolling so this property is unused. * `RCTMultilineTextInputView` delegates the `scrollEnabled` to it's underlying `_scrollView` * `RCTUIScrollView` defaults initial `scrollEnabled` to `YES` * `RCTUIScrollView` disables scrolling when the `scrollEnabled` is `NO` Test Plan: ## Zeratul ``` MDSTextInput {...textInputProps} {...(IS_MAC ? {multiline: true, blurOnSubmit: true, scrollEnabled: false} : {})} // workaround for T110399243 ``` |before|after| | https://pxl.cl/27gQp|https://pxl.cl/27gQr| ## RN Tester |before|after| |https://pxl.cl/27gRd|https://pxl.cl/27gRh| Reviewers: lyahdav, ericroz, ackchiu, #seller_expansion Reviewed By: lyahdav Differential Revision: https://phabricator.intern.facebook.com/D37659010 Tasks: T120776572 Tags: marketplace, marketplace_seller_expansion # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m # Libraries/Text/TextInput/RCTBaseTextInputViewManager.m # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # React/Base/RCTUIKit.h # React/Base/macOS/RCTUIKit.m # Conflicts: # Libraries/Text/TextInput/RCTBaseTextInputViewManager.m # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m
shwanton
pushed a commit
to shwanton/react-native-macos
that referenced
this issue
Mar 10, 2023
Summary: # Context RN iOS supports disabling scrolling via `scrollEnabled` prop for multiline text inputs. https://reactnative.dev/docs/0.68/textinput#scrollenabled-ios This does [not work](microsoft#925) on MacOS Since MacOS does not use `UITextView` which inherits from `UIScrollView`, the view manager property was set but not actually passed down to the underlying scroll view. `RCTMultilineTextInputView` creates a `RCTUIScrollView` which is where we need to disable scrolling. https://www.internalfb.com/code/archon_react_native_macos/[fde4113acd89fb13ee11636c48b59eac49c21bae]/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m?lines=31 `RCTUIScrollView` inherits from `NSScrollView` which does not have a `scrollEnabled` property, but there is an api we can use to disable scrolling when the property is set. https://developer.apple.com/documentation/appkit/nsscrollview/1403494-scrollwheel # Usage NOTE: Only works with `multiline={true}` ``` <TextInput multiline={true} scrollEnabled={false} ... /> ``` # Change * Only expose the `scrollEnabled` property on `RCTMultilineTextInputView`. * `RCTSinglelineTextInputView` does not have scrolling so this property is unused. * `RCTMultilineTextInputView` delegates the `scrollEnabled` to it's underlying `_scrollView` * `RCTUIScrollView` defaults initial `scrollEnabled` to `YES` * `RCTUIScrollView` disables scrolling when the `scrollEnabled` is `NO` Test Plan: ## Zeratul ``` MDSTextInput {...textInputProps} {...(IS_MAC ? {multiline: true, blurOnSubmit: true, scrollEnabled: false} : {})} // workaround for T110399243 ``` |before|after| | https://pxl.cl/27gQp|https://pxl.cl/27gQr| ## RN Tester |before|after| |https://pxl.cl/27gRd|https://pxl.cl/27gRh| Reviewers: lyahdav, ericroz, ackchiu, #seller_expansion Reviewed By: lyahdav Differential Revision: https://phabricator.intern.facebook.com/D37659010 Tasks: T120776572 Tags: marketplace, marketplace_seller_expansion # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m # Libraries/Text/TextInput/RCTBaseTextInputViewManager.m # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m # React/Base/RCTUIKit.h # React/Base/macOS/RCTUIKit.m # Conflicts: # Libraries/Text/TextInput/RCTBaseTextInputViewManager.m # Conflicts: # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h # Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m
This is still an issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Steps to reproduce the bug
Create a TextInput with multiline={true} and scrollEnabled={false} but the field will still grab the scroll once the mouse hovers over.
Expected Behavior
If scroll is false we should be able to scroll right over the top of it.
Actual Behavior
No response
Reproducible Demo
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: