-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Wrong cursor when hovering disabled TextInput #9327
Comments
This is likely the behavior of the XAML TextBox control and just isn't matching expectation. I've seen that sort of thing before (e.g. microsoft/microsoft-ui-xaml#5487). Certainly an IsReadOnly TextBox still shows the cursor (because you can copy and select out of it). That same policy may have been made for disabled+readonly. @TatianaKapos Can you check the behavior in a plain UWP app and see if we're changing the text input behavior in RNW or if this is the platform default? |
@chrisglein Looks like UWP does change the cursor for a Textbox that is disabled, however the web version of react does not change the cursor (https://snack.expo.dev/@tatianak/textinput). UWP App Output ApplicationFrameHost_i2Qiq9P8Lp.mp4React Native Output ApplicationFrameHost_JeB6TEgsgk.mp4 |
I thought There's definitely mojo to match XAML's TextBox (which is a very opinionated control) to RN's TextInput (which is supposed to be less opinionated about visual styling). Maybe this is something lost in the shuggle. Certainly seeing how Web behaves provides context (as in it doesn't match expectations). |
I don't understand why simplistic web behaviours, dominate the rich experience of client applications. |
@Balkoth Well, it would make more sense if the text was selectable, but it's not even though the cursor suggests so. |
@chrisglein Interestingly the Microsoft Docs for that property state, " If the reason you don't want the control to be a tab stop is because it's not interactive in your UI, you might want to set IsEnabled to false to make the lack of interaction more obvious. Many controls have predefined visual states that are invoked for IsEnabled =false, such as "graying out" text in labels." So perhaps we want to set both properties for focusable? |
Ask around and see if you can get the history of this. Marking something as able to receive keyboard with |
Here's the PR that introduces the property with the corresponding issue. Run down looks like ScrollView needed to access But, adding |
It's by design that "focusable" maps to only IsTabStop. Individual controls expose separate props that look more like "enabled". |
Problem Description
When we have a TextInput set with focusable={false} editable={false} - the cursor will still change on hover.
Steps To Reproduce
Create the following element:
Hover over the element to see the cursor change.
Expected Results
Cursor should ignore disabled elements.
CLI version
npx react-native --version
Environment
Target Platform Version
10.0.19041
Target Device(s)
Desktop
Visual Studio Version
No response
Build Configuration
No response
Snack, code example, screenshot, or link to a repository
No response
The text was updated successfully, but these errors were encountered: