Standard html range slider does not take event listeners

The standard range slider

input type="range"

will only take input and change as event listeners and does not respond to other events like mousedown, mouseup etc…

Would sp-slider be an option?
https://developer.adobe.com/photoshop/uxp/uxp/reference-spectrum/User%20Interface/sp-slider/

Thanks. A workaround isn’t the problem. Just reporting another annoying bug.
In 2019 documentation said devs should stick to spectrum components because it’s the “only reliable blah blah”… In 2022 nobody cares.
In 2019 they said API 1 is beta. In 2022 we know API 2 is beta and V1 was alpha.
Maybe not the right place to say this, but i’m fed up of this and the bad docs. It’s even worse than CEP. I know other devs are thinking the same but nobody talks about it. It cost’s me money every day figuring out workarounds.

I completely agree that JS and CSS (basically whole UI) on UXP is far from good, but I understand it’s not a priority (at least for now). Hopefully this will change sooner rather than later

1 Like

Thank you. I do not understand why Adobe acts so headless. They are scaring devs and customers away.
CEP was already slow and had a bad documentation. When i began writing extensions i would have been lost without Davide Barranca and without the PSD scripting forum. Or extensions that converted actions to JS.
It’s the same with UXP. Without Alchemist, where would we stand after 4 years of UXP? How many DOM methods do we have? Twenty?
This is all one big workaround. We work around the missing Spectrum Elements with React. We work around missing DOM methods with Alchemist.
I don’t see a single advantage for users or devs in UXP over CEP. The opposite is the case. Users are loosing plugins/money. Devs are too. Devs must explain to users why this happens…

And on the other side i see a lot of effort making PS a Lumariver clone with ridiculous “neural” filters.
PS 2020 still looks like CS6. The last good non-bloated CC version was CC2018. Still running much faster on a 2006 Mac Pro 1,1 than CC2022 on a M1.
After all these years i expect a PS CS6 on steroids and not on crack and donuts.

And then i read the docs that say, i should use Spectrum Elements to integrate best with the PS UI. I mean integrate with a 16 year old UI?
And then it doesn’t even integrate. Wrong font sizes/colors, paddings, different sliders, text boxes… For 4 years! And we don’t even have access to change something in CSS!
And that won’t change. It didn’t in 7 years of CEP and it won’t in UXP. If there ever was an initial concept, noone at Adobe sticks to it.

So hard to see how PS is going down the drain. Of course i believe Adobe doesn’t have bad intentions. But the waste of human and technological ressources is more than obvious.
Maybe i’m wrong. But this is my perspective, opinion and feedback. And i could continue with more issues nearly endlessly i guess. Not expecting an answer from Adobe. Still thankful they left a door open for us for earning money with writing plugins.

@Michel77 Thank you for your candid and passionate feedback. There’s a lot to unpack there, and it’s clear that we’ve not met your expectations for a long time. I’m sorry. There’s not really anything I can say that will help here that won’t come off as “distinctions without a difference” as viewed from the outside looking in or as tone-deaf, unfortunately, so I’ll not bother to offer much in terms of explanation or excuses. There’s also a lot in there that I can’t speak to, given that (internally) Adobe is not a monolith, and there are lots of moving pieces over which we as the extensibility team have limited or no insight into nor control over.

I’m only going to focus on the original issue and the suggestions in this response so as to not conflate or add additional noise to the technical response.

To the original issue as reported – you’re correct – native controls have significantly less event handling ability than do divs, spans, or Spectrum UXP controls. I will not go into the reasons why this is true except to call out that you’ve already hit on it: the Photoshop UI has a lengthy history. The native UI was built in a different era, and the cracks can definitely show at the seams.

This thread already mentions using sp-slider (this does work – just tested it), or building your own. Another option is to use some of the other events that do get fired. To see if that would be useful, I need to understand your particular use case – what kind of feature are you building where mouseup and mousedown are needed on a ranged slider?

I get that the above will sound like “oh, let’s find another workaround” – and it would be – but I’m asking in the spirit of trying to understand your particular use case and how we can unblock it with things where they are today so you can get on with the work of continuing development.

Sidebar: I thought I’d drop this sample here, just in case it proves useful to you or someone reading this thread in the future. It might give a good starting point for one’s own custom slider.

1 Like

Thank you for anwering @kerrishotts .
There are a few core points i would like to point out, that you/the team might not have on the radar.
Thing is, there are developers like me, who earn their living by selling plugin/extension licenses.
Since Adobe went over to CC in 2014 we had to deal with a lot of difficulties that caused cracks in our trust in Adobe’s APIs. And since 2018 i’ve got the feeling that i can no longer rely on what Adobe announces. In 2020 i was clear that i couldn’t trust Adobe’s announcememts anymore. That was when the Apple M1 was released. That is what i meant when i wrote that “Adobe is scaring developers away”. Because i am scared. Just think about CEP/M1! Do you know how some customers react when i have to explain the whys and whats?
For many plugin developers CEP or UXP is just a hobby or additional source of money. They can live better with these circumstances than i can.

When UXP was announced, Adobe made a lot of noise about it with shiny promises all over. And now three years have passed (that’s nearly half the life span of CEP) and we got a documentation mess with broken links again. My CEP panels are declared “legacy” in Photoshop’s UI what makes my customers talk on forums about things like “don’t trust that seller, Adobe will remove the API they are using”.
In UXP we are working in a very restrictive programmatical environment where even the easiest things require workarounds or are not even possible. Like reading UUIDs, what forces many developers to publish on Adobe Marketplace…No “binary” obfuscation like we had for JSX… Ccx doesn’t allow installing ICC or camera profiles/presets.

In a nutshell, developing “serious” plugins for Adobe Photoshop means having high costs for a low trust level a lot of unneccessary efforts and a shrinking target group.
Don’t want to talk about Gimp or C1. Just look in the Adobe neighbourhood. Lightroom is making good progress in terms of UI but has a stable LUA API for a decade. And the target group is wayyy larger.

Remember we plugin developers are here to make PS better/more accessible for users. I even have clients that only subscribed to the cloud to be able to use my extensions. We cannot make PS better if we are forced to “integrate” and have no access to important functions. We really need to have access to scripting the ACR module, generating UUIDs, realtime changes of sliders etc… And we need a stable basis for that. ATM i’m really thinking about leaving UXP alone and developing standalones with Atom/Imagemagick or even C++/GTK.

Thank you for the slider “workaround example”. As said, finding a workaround is nearly always possible (but time consuming). I appreciate your engagement in finding workarounds for us. I observed you are always helping people if you have the time.
But, well… A workaround shouldn’t be considered as a solution…

Events like onmousedown can be used for creating a layer that is needed for the slider for example.

You asked me in another thread if i am in the dev group. And yes i am. But honestly Kerri, i don’t visit it too often. I find it unneccessary to have another group for UXP. It’s just even more puzzling. I mean, yeah cool, a pre-release group. That’s fine. But i find it unconvenient to find my infos scattered over ten different places. Many questions asked there belong here. And i think so did mine.

BTW sp-slider does not react to left/right arrow keys, <type=“input”> does.