-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi!
We are using the sapphire theme as main theme of the app. The problem comes when we change the theme in a window like this:
You can see that it changes the styles of the components to the iceblue theme except the buttons:
But if we refresh the window the button style changes correctly:
Could this be a bug or what could be happen? We do this with the atlantic theme and it works correctly
Thank you!!
Hey there,
From memory, there is nothing specific about the buttons which would cause this behavior in out-of-the-box ZK.
I'd suggest using client-side developer tools (inspect element) to view the styles applied to the buttons after switching themes, when they still have the wrong theme applied to them.
If I had to guess, I wonder if there is a sclass (or other CSS rule) applied on the buttons or their ancestors at page creation depending on the theme. For example, if you have something like (pseudo code):
if(theme.equals(ATLANTIC))
buttonDiv.setSclass("atlantic-buttons-container");
This could explain this sort of behavior. In any case, if you use the client-side inspector to lookup where the rules for button background color and border are coming from, you'll probably get a hint as to where the issue is located.
Asked: 2022-11-14 16:21:58 +0800
Seen: 7 times
Last updated: Nov 15 '22