Ripple directive seems to not works on Button element on iOS
Closed this issue · 4 comments
If the demo apps cannot help and there is no issue for your problem, tell us about it
If I add ripple directive to a element, the (tap) event is not triggered on iOS.
Which platform(s) does your issue occur on?
- iOS
Please, provide the following version numbers that your issue occurs with:
- CLI: 4.2.3
- Cross-platform modules: 4.2.0
- Runtime(s): 4.2.0
- Plugin: 2.0.0
Please, tell us how to recreate the issue in as much detail as possible.
<Button ripple text="Test" (tap)="test()">
Is there any code involved?
No
As a temporary "solution", we can add this to main.ts (The app entry point):
import {isIOS} from 'tns-core-modules/platform';
import {ButtonBase} from 'tns-core-modules/ui/button/button-common';
if (isIOS) {
delete ButtonBase.tapEvent;
}
I do not know yet if there is any serious side effects.
This only happens with buttons, as a result I'm using Labels as buttons in my apps as a workaround.
That said, please try it with tns-core-modules 4.2.1, as it seems they fixed something that might be related:
NativeScript/NativeScript#6113
https://github.com/NativeScript/NativeScript/blob/master/CHANGELOG.md#421-2018-09-18
Yes now it's works ... Thx :)
Glad it worked!