Open socketpair opened 3 years ago
I think, it because disabled elements do not intercept click / double click
I think, it because disabled elements do not intercept click / double click
Correct, but only Material-UI Button. We're setting pointer-event: none
on disabled buttons. But it looks like we no longer need it and can adjust some CSS (see #23101 for progress). This is preferable over overwriting platform behavior since disabling pointer-event has some unforeseen consequences such as this issue.
@eps1lon Is the following summary correct, pointer-event: none
is only required in two cases:
<button>
, like a <a>
, <div>
, etc.onMouseOver
.I think that the Pagination component should primarily be used with a link, <a>
. We need to swallow the onClick event, but what about the other events, won't they need a pointer-event: none
style?
Maybe the current behavior is the downside of these constraints, something we have no freedom to fix (other tradeoffs making things, worse, overall)? Not sure, I guess it needs further exploration to know 🤔 .
Is the following summary correct, pointer-event: none is only required in two cases
It's never required for interactive elements. As far as I can tell it was only used as a shortcut without being aware of all the unintended side-effects. These are minute nuances that are hard to miss but since we're now aware of all the problems pointer-events: none
causes we can get rid of it.
Still reproduced... https://mui.com/material-ui/react-pagination/
https://material-ui.com/ru/components/pagination/
Fast clicking on
>
on first line in screenshot autoselects...
on next line: