Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Spotify custom implemented this for their desktop client. You could right click on a song, open the submenu "add to playlist", and type a few characters. Idk why they bothered custom implementing that when a select list is a standard element no matter what framework they use, but I was happy. Then cometh the update and the feature be regressed. I now need to use the mouse for literally everything, including looking through this list with no discernable sorting (it's not alphabetical). Only spacebar for play/pause survived, all other keyboard controls seem gone or I can't guess them.

Just use normal components. Save the effort, help the screen reader, please the power user. Please.



Ugh, Slack too. For ages they didn't have right-click menus anywhere. Then a while ago, they added right-click menus to channels, but of course they couldn't just use the native menus that every OS already has, so it's some HTML abomination that had to rewrite the wheel for handling things like lenient mouse movement (e.g. https://css-tricks.com/dropdown-menus-with-more-forgiving-mo...). Still doesn't support type-to-select, or god knows how many other accessibility and power user niceties.


I don't know if Electron has an API for menus, but the HTML elements that let you add items to the native contextmenu were scrapped, and every browser I know of renders their own menus on Windows/Linux anyway. There is not a way to add a native contextmenu unless you do something cursed like positioning an invisible <select> where the mouse is and opening it on right click.

Edit: Never mind, there is no way to open a <select> with JS.


I know, but other Electron apps manage to do it (VS Code, Postman), so there must be a way.

edit: some quick googling reveals there is an API for this https://www.electronjs.org/docs/latest/api/menu#class-menu


You could organize your playlist in folders. Not a solution but that might make it bearable :P


what does this have to do with form fields? edit: I see you think that context menus are form fields. Thats incorrect.


It's not about form fields, it's about type-to-select. No one said anything about context menus being the same as form fields.


did you read the article? the context of this entire thread is about form fields.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: