Webform range slider with left or right output in firefox

Created on 28 July 2023, over 1 year ago

Problem/Motivation

Webform range slider with left or right output, the last digit can sometimes be hidden in firefox.

For example, when the range max is 999 then the 3rd digit falls behind the up/down selector the browser provides. See image, the top slider = 600. When it is 1000 then it is okay.

Since it isn't in css then it can't be adjusted for browser nuances.

Proposed resolution

@\modules\contrib\webform\src\Plugin\WebformElement\Range.php line at 120 change to

$output['#attributes']['style'] .= ($output['#attributes']['style'] ? ';' : '') . 'width:' . (strlen($element['#max'] . '') + 1.5) . 'em';

πŸ› Bug report
Status

Active

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States crutch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024