-
-
Notifications
You must be signed in to change notification settings - Fork 829
Conversation
hmm, should we manually add the aria shenanigans to keep this accessible? |
Hmm... I guess alternately, I could still use |
Or that, yeah. Did you figure out why onClick wouldn't work in the end? I tried, and it ended up being a weird tri-state of enabled | nothing | disabled ... |
Right. After some more inspection and hair-pulling, there seems to be a race when toggling Markdown sets state in My current plan is to go with |
`AccessibleButton` expects click handlers, which we can use here, as long we make some additional changes to avoid race processing the new state (see subsequent patch). Fixes element-hq/element-web#8866
The step that would notify parent components of rich text state changes was stirred into the input's change handler, which leads to race which the parent is sometimes notified of the old rich text state instead of the new. Here we avoid this complication by using a separate path for sending the rich text state when we know we have updated it correctly.
70561b3
to
ccd4dee
Compare
div
s for Markdown buttonsonClick
to Markdown buttons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better than before - thanks!
The Markdown toggles need to watch
mousedown
to properly update state, solet's drop back down to regular
div
s.This also fixes element-hq/element-web#8866.