-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[NS8] isEnabled property on Button is not propagating to native's enable property (Appium, iOS, Android) #9455
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
Comments
This is related to the a11y changes, A simple workaround would be to add the following css: *:disabled {
a11y-state: disabled;
} However a proper fix would be required in core. @m-abs I was thinking of setting it here inside the NativeScript/packages/core/ui/core/view/view-common.ts Lines 1118 to 1126 in f6faa45
|
It might cause some inconsistency problems, if |
do you think it can be fixed for next patch? |
@rigor789 btw, can you try and help us to come out with better solution? |
The following workaround (the css one can be removed, this one replaces it) will fix the issue until we implement a fix in core: import { Observable, AccessibilityState } from '@nativescript/core'
Observable.on('isEnabledChange', (args) => {
args.object.accessibilityState = args.value ? undefined : AccessibilityState.Disabled;
}) This can be placed in the application entry file (main.js/ts, app.js etc). |
Nativescript 8.5.0 , Angular 15.2.0 Added
to my main.ts file, but it didn't help. So, I decided to add some console logs to review the behavior. It turned out that callback was not called on enabledProperty change. To debug place where event is triggered, I added console logs in
Since the listener for Is there any way to overcome this problem? |
@IlIAntonIlI I think we'll need to reconsider few things for accessibilityState property. |
+1 still seeing this problem in Appium |
Uh oh!
There was an error while loading. Please reload this page.
back in the days of Native Script 7, on using isEnabled property with Button I could see
on my Appium desktop that enabled property is changing accordingly, i.e.
when isEnabled=true, so enabled got true as well...
but now with NS8, enabled property is true no matter what I pass to isEnabled on the Button element.
the weird part is that the button functionality plays correctly, it is just that Appium keeps the attribute true...
I have switched from NS7 to NS8 multiple times to validate that I see correctly - and I strongly believe it is a bug on NS8.
also, our automation started failing when expecting this property to be false (and it passed with NS7)
The text was updated successfully, but these errors were encountered: