Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
26d6a07d
Commit
26d6a07d
authored
Oct 21, 2021
by
Michael Iseard
Browse files
Fix issue with select input being blank on Firefox
parent
1fab2e22
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/public/macros/form.html.twig
View file @
26d6a07d
...
...
@@ -112,24 +112,22 @@
{# Select box #}
{%
macro
select
(
props
)
%}
<label
class=
"kd-inline-block kd-relative kd-cursor-pointer kd-font-normal kd-mt-2 kd-w-full"
>
<select
class=
"kd-bg-select kd-bg-white kd-bg-no-repeat kd-appearance-none kd-bg-right-2 kd-border-gray-300 kd-border kd-border-solid focus:kd-border-primary focus:kd-ring-primary kd-transition-colors kd-ease-in-out kd-rounded kd-w-full kd-py-2 kd-px-3 kd-text-gray-700"
{{
(
props.required
?
"required"
)
}}
name=
"
{{
props.name
}}
"
aria-label=
"
{{
props.placeholder
??
props.label
}}
"
style=
"background-size: 1.5em 1.5em"
>
<option
value=
""
disabled
selected
>
{{
props.placeholder
?
props.placeholder
~
(
props.required
?
' *'
)
}}
</option>
{%
for
value
,
text
in
props.options
%}
<option
value=
"
{{
value
}}
"
>
{{
text
}}
</option>
{%
endfor
%}
</select>
</label>
<label
class=
"kd-inline-block kd-relative kd-cursor-pointer kd-font-normal kd-mt-2 kd-w-full"
>
<select
class=
"kd-bg-select kd-appearance-none kd-bg-white kd-bg-no-repeat kd-bg-right-2 kd-border-gray-300 kd-border kd-border-solid focus:kd-border-primary focus:kd-ring-primary kd-transition-colors kd-ease-in-out kd-rounded kd-w-full kd-py-2 kd-px-3 kd-text-gray-700"
{{
(
props.required
?
"required"
)
}}
name=
"
{{
props.name
}}
"
aria-label=
"
{{
props.placeholder
??
props.label
}}
"
style=
"background-size: 1.5em 1.5em; content: initial !important;"
>
<option
value=
""
disabled
selected
>
{{
props.placeholder
?
props.placeholder
~
(
props.required
?
' *'
)
}}
</option>
{%
for
value
,
text
in
props.options
%}
<option
value=
"
{{
value
}}
"
>
{{
text
}}
</option>
{%
endfor
%}
</select>
</label>
{%
endmacro
%}
{# Text area element #}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment