I’m so tired of chasing changes, that constantly break something
Active state of the
sp-action-button definitely used to work when I implemented it while developing a plugin, but now I noticed that at some point it just stopped working. It still works if there’s no custom
background-color set to it. It also works when I switch the
:active state on UDT Dev Tools, but it seems like button would not toggle the state when clicked on it.
Was thinking if it could be related to all the recent changes to how mouse events are treated
I cannot repro on the macOS side:
Can you try w/ same CSS on Windows?
outline: 2px solid blue;
FYI: @pkrishna @Sujai
Same works if I have a background color.
I just played around and found the exact issue. It’s the
::after and empty
padding: 5px 10px;
I need a single border color and as you can see it doesn’t normally work. I then took your advice to fake borders with
::after and implemented it.
And borders still work, but now background is broken, which did work - it broke with one of the recent versions of Ps. Also, as I mentioned, switching
:active state in Dev Tools, switches it without issue
OK… So while playing with it, I found this is most likely the exact same reason Inspector selector doesn’t work on these buttons (but this one never worked as I remember):
BTW, which plugin are you using in the video? I don’t see “Edit Code” among sample plugins. UI Playground is a mess
So I was thinking what’s going on and how
absolute element on top of the actual button and thought what would happen if I add
pointer-events: none to it. And it actually helped - both active state triggers on mouse down and inspector now selects the button.
But this made me realize, there’s another issue with UDT - Dev Tools elements doesn’t show pseudo-elements, which also makes UI development more difficult.
I’m marking this post as a solution, because it kinda makes sense, but it doesn’t explain why it used to work