Skip to content

Restore tooltip behavior for disabled `input`s

Administrator requested to merge kr/disabled-input-tooltip into main

Created by: courier-new

While working through making the preview changeset list items selectable for #23383 (closed) I discovered a small bug where tooltips would not appear when you hovered an input if that input is disabled. It turns out disabled form elements don't produce mouse events (makes sense; if it's disabled, you shouldn't be able to interact with it). But our Tooltip implementation relies on mouse events to render the little overlay. There's a couple places in batch changes where it's useful to know why an input is actually disabled, so I created a workaround by just overlapping a div with the tooltip that can trigger the mouse events, instead.

image

I searched the codebase for other instances of this but it seems we're the only ones with instances of inputs that are both disabled and have a tooltip. This probably also affects other form elements, but there are probably equally few of those, so I just left it at this for now.

Merge request reports

Loading