5 ms·
A button can easily be styled and it’s definitely easier to fix the one little behavior than to reimplement all the other behaviors that are needed.
by dpark 1y ago
A button can easily be styled and it’s definitely easier to fix the one little behavior than to reimplement all the other behaviors that are needed.
- Levitz 1y agoAnd yet often this is not what happens. Why? People don't do stuff poorly on purpose. There's also nobody out there for which button elements are some arcane and obscure thing, we all know they exist, so what is happening? I'm not arguing for using divs instead of buttons, I'm arguing that if that happens there's a reason for it, and we ought to look at that reason and attempt to deal with it rather than admonishing developers in general.
- dpark 1y agoDoes it happen often? The unintended behavior seems extremely discoverable. “Hey, Google. Why does my button onclick not fire correctly?” “Oh, I need to set this stupid property.” Would it be nice if this wasn’t necessary? Sure. But browsers aren’t going to break compatibility to fix this quirk. > we ought to look at that reason and attempt to deal with it I’m curious how you think we could deal with this aside from education.
- brazukadev 1y agoIt happens often using react because react is full of foot guns