Prevent autofocusing the filter input in drop downs
This commit is contained in:
@@ -48,6 +48,10 @@
|
||||
.popup__title {
|
||||
font-weight: 800;
|
||||
white-space: nowrap;
|
||||
|
||||
&[tabindex="-1"]:focus-visible {
|
||||
outline: unset;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide lists when all the items within are hidden */
|
||||
@@ -155,7 +159,7 @@
|
||||
max-inline-size: 100%;
|
||||
padding: var(--inline-space-half) var(--popup-item-padding-inline);
|
||||
text-align: start;
|
||||
|
||||
|
||||
&:focus-visible {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Board…" do %>
|
||||
<strong class="popup__title">Board…</strong>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small font-weight-normal", autofocus: true,
|
||||
<%= tag.strong "Board…", class: "popup__title", tabindex: (-1 if platform.mobile?), autofocus: platform.mobile? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small font-weight-normal", autofocus: !platform.mobile?,
|
||||
type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>
|
||||
|
||||
<ul class="popup__list" data-filter-target="list" role="listbox">
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Person…" do %>
|
||||
<strong class="popup__title">Person…</strong>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small font-weight-normal", autofocus: true,
|
||||
<%= tag.strong "Person…", class: "popup__title", tabindex: (-1 if platform.mobile?), autofocus: platform.mobile? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small font-weight-normal", autofocus: !platform.mobile?,
|
||||
type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>
|
||||
|
||||
<ul class="popup__list" data-filter-target="list" role="listbox">
|
||||
|
||||
@@ -16,10 +16,9 @@
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Assigned to…" do %>
|
||||
<strong class="popup__title">Assigned to…</strong>
|
||||
|
||||
<%= tag.strong "Assigned to…", class: "popup__title", tabindex: (-1 if platform.mobile?), autofocus: platform.mobile? %>
|
||||
<% if Current.account.users.active.many? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: !platform.mobile?,
|
||||
type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Board…" do %>
|
||||
<strong class="popup__title">Board…</strong>
|
||||
|
||||
<%= tag.strong "Board…", class: "popup__title", tabindex: (-1 if platform.mobile?), autofocus: platform.mobile? %>
|
||||
<% if user_filtering.boards.many? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: !platform.mobile?,
|
||||
type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Closed by…" do %>
|
||||
<strong class="popup__title">Closed by…</strong>
|
||||
|
||||
<%= tag.strong "Closed by…", class: "popup__title", tabindex: (-1 if platform.mobile?), autofocus: platform.mobile? %>
|
||||
<% if user_filtering.users.many? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: !platform.mobile?,
|
||||
type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Added by…" do %>
|
||||
<strong class="popup__title">Added by…</strong>
|
||||
|
||||
<%= tag.strong "Added by…", class: "popup__title", tabindex: (-1 if platform.mobile?), autofocus: platform.mobile? %>
|
||||
<% if user_filtering.users.many? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: !platform.mobile?,
|
||||
type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
</template>
|
||||
|
||||
<%= filter_dialog "Tagged…" do %>
|
||||
<strong class="popup__title">Tagged…</strong>
|
||||
|
||||
<%= tag.strong "Tagged…", class: "popup__title", tabindex: (-1 if platform.mobile?), autofocus: platform.mobile? %>
|
||||
<% if user_filtering.tags.many? %>
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
<%= text_field_tag nil, nil, id: nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: !platform.mobile?,
|
||||
type: "search", autocorrect: "off", autocomplete: "off", data: { "1p-ignore": "true", filter_target: "input", action: "input->filter#filter" } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user