modal issue
jeffswitzer opened this issue · comments
Great work as always Nathan!
I gave this plugin a shot and after adding this css
Button {
background-color: red;
}
.android Button {
background-color: purple;
}
The majority of the buttons show up as purple on my android device as expected. However when calling alert("welcome");
the alert button shows up as red. Additionally all buttons nested in any modal pages show up as red on android.
I'm not sure how easy the dialogs can be fixed; that is a very sticky issue, based on how everything works. But the show modal, I would have thought should have worked out of the box. I'll try and take a look into that one with the 3.0 revamping that has to happen.
Thanks for the bug report.
Hi Nathan, I am running into the same issue with modals as well. Any chance you'd get around to fixing this? Maybe now that modals have been reworked in NS 4.1 this should be easier to fix?
Thanks a lot!
I see that the global variable nsPlatform
from the nativescript-platform
plugin is available inside the modal component.
It seems that the Page.navigatedToEvent
that nativescript-platform-css
is using is not fired when "navigating" to a modal. So I guess this issue is more a limitation of the nativescript-platform
plugin.
Ok I was able to get it to work in modals by adding the shownModallyFirst
event which is already supported by nativescript-global]events
. I created PR #18 for this.
Thank you @abhayastudios for the fix - I have merged the PR; and published 1.6.6 which contains this.