Skip to content

Commit

Permalink
<option> used when no flag is set is displayed as 'X' in Safari (#47)
Browse files Browse the repository at this point in the history
After 7d0c10e,
the <option> used when no flag is set is displayed as 'X' in Safari. This is because WebKit
displays the label when provided as per the latest HTML specification:
- https://html.spec.whatwg.org/multipage/rendering.html#the-select-element-2
- https://html.spec.whatwg.org/multipage/forms.html#concept-option-label

Chrome/Blink also display the label in standards mode, but not in quirks mode. The proposed
fix is to use a whitespace as label instead of 'X'. This renders as empty in Firefox / Chrome
and Safari and is still recognized as valid HTML as per https://validator.w3.org.
  • Loading branch information
Chris Dumez authored and dylanwh committed Feb 13, 2018
1 parent 08a3617 commit 8103d9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template/en/default/flag/list.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<option value="[% dontchange FILTER html %]">[% dontchange FILTER html %]</option>
[% END %]
[% IF !flag || (can_edit_flag && user.can_request_flag(type)) || flag.setter_id == user.id %]
<option value="X" label="X"></option>
<option value="X" label=" "></option>
[% END %]
[% IF type.is_active && can_edit_flag %]
[% IF (type.is_requestable && user.can_request_flag(type)) || (flag && flag.status == "?") %]
Expand Down

0 comments on commit 8103d9b

Please sign in to comment.