Problem/Motivation
Identified as meriting its own issue in #2995689: Allow reordering blocks without a pointer device
This issue is apparent when:
- A table using tabledrag is in an off-canvas dialog
- "Show Row Weights" is selected, so the row weights are visible in the table.
- The row is being hovered over, or
- The row was dragged to a new position prior to enabling "Show Row Weights" but not before saving the new ordering.
In this image, the "Body" row is being hovered over, and "Image (current)" was dragged to a new position.
The "weight" form input should take on the background color of the row it belongs to, but it does not. Instead, the form input background color is #444
determined by the reset rules in off-canvas.base.css
#drupal-off-canvas *, #drupal-off-canvas *:not(div) {
background: #444;
}
This is because the rules determining background color in off-canvas.tabledrag.css are applied to <td>
elements, but do not account for elements inside those <td>
s. As a result, they are styled by the rules in off-canvas.base.css mentioned above
Proposed resolution
Add rules to off-canvas.tabledrag.css to address the conflicting background colors.
Remaining tasks
Add/change styles, review, commit.
User interface changes
The weight column in tabledrag assumes the expected behavior of having the background color of the row it is in.
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A