Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VSelect): set input type to hidden to fix potential layout issues #7544

Merged
merged 2 commits into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`VDataFooter.ts should render and match snapshot 1`] = `
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -91,7 +91,7 @@ exports[`VDataFooter.ts should render first & last icons with showFirstLastPage
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -186,7 +186,7 @@ exports[`VDataFooter.ts should render in RTL mode 1`] = `
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -281,7 +281,7 @@ exports[`VDataFooter.ts should render with custom itemsPerPage 1`] = `
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -355,7 +355,7 @@ exports[`VDataFooter.ts should show current page if has showCurrentPage 1`] = `
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`VDataIterator.ts should render and match snapshot 1`] = `
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -124,7 +124,7 @@ exports[`VDataIterator.ts should render and match snapshot with data 1`] = `
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -204,7 +204,7 @@ exports[`VDataIterator.ts should render valid no-data, loading and no-results st
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -284,7 +284,7 @@ exports[`VDataIterator.ts should render valid no-data, loading and no-results st
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -364,7 +364,7 @@ exports[`VDataIterator.ts should render valid no-data, loading and no-results st
<input aria-label="$vuetify.dataFooter.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`VDataTable.ts should render 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -163,7 +163,7 @@ exports[`VDataTable.ts should render loading state 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -367,7 +367,7 @@ exports[`VDataTable.ts should render loading state 2`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -653,7 +653,7 @@ exports[`VDataTable.ts should render virtual table 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -841,7 +841,7 @@ exports[`VDataTable.ts should render with body slot 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -1128,7 +1128,7 @@ exports[`VDataTable.ts should render with data 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -1310,7 +1310,7 @@ exports[`VDataTable.ts should render with group scoped slot 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -1735,7 +1735,7 @@ exports[`VDataTable.ts should render with group.summary scoped slot 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -2106,7 +2106,7 @@ exports[`VDataTable.ts should render with grouped rows 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -2308,7 +2308,7 @@ exports[`VDataTable.ts should render with item scoped slot 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -2620,7 +2620,7 @@ exports[`VDataTable.ts should render with item.expanded scoped slot 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -2955,7 +2955,7 @@ exports[`VDataTable.ts should render with showExpand 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -3290,7 +3290,7 @@ exports[`VDataTable.ts should render with showExpand 2`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -3652,7 +3652,7 @@ exports[`VDataTable.ts should render with showSelect 1`] = `
<input aria-label="$vuetify.dataTable.itemsPerPageText"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ exports[`VDataTableHeader.ts mobile should render 1`] = `
<input aria-label="Sort by"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -603,7 +603,7 @@ exports[`VDataTableHeader.ts mobile should render with data-table-select header
<input aria-label="Sort by"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -667,7 +667,7 @@ exports[`VDataTableHeader.ts mobile should work with multiSort 1`] = `
<input aria-label="Sort by"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -718,7 +718,7 @@ exports[`VDataTableHeader.ts mobile should work with showGroupBy 1`] = `
<input aria-label="Sort by"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -782,7 +782,7 @@ exports[`VDataTableHeader.ts mobile should work with sortBy correctly 1`] = `
<input aria-label="Sort by"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -846,7 +846,7 @@ exports[`VDataTableHeader.ts mobile should work with sortDesc correctly 1`] = `
<input aria-label="Sort by"
autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down
1 change: 1 addition & 0 deletions packages/vuetify/src/components/VSelect/VSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ export default baseMixins.extend<options>().extend({

input.data!.domProps!.value = null
input.data!.attrs!.readonly = true
input.data!.attrs!.type = 'hidden'
input.data!.attrs!['aria-readonly'] = true
input.data!.on!.keypress = this.onKeyPress

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports[`VSelect.ts should only show items if they are in items 1`] = `
</div>
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -72,7 +72,7 @@ exports[`VSelect.ts should only show items if they are in items 2`] = `
<div class="v-select__selections">
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -120,7 +120,7 @@ exports[`VSelect.ts should only show items if they are in items 3`] = `
</div>
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -171,7 +171,7 @@ exports[`VSelect.ts should only show items if they are in items 4`] = `
</div>
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -216,7 +216,7 @@ exports[`VSelect.ts should render v-select correctly when not using scope slot 1
<div class="v-select__selections">
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -261,7 +261,7 @@ exports[`VSelect.ts should render v-select correctly when not using v-list-item
<div class="v-select__selections">
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -306,7 +306,7 @@ exports[`VSelect.ts should render v-select correctly when using v-list-item in i
<div class="v-select__selections">
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`VSelect.ts should be clearable with prop, dirty and multi select 1`] =
</div>
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -74,7 +74,7 @@ exports[`VSelect.ts should be clearable with prop, dirty and single select 1`] =
</div>
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down Expand Up @@ -131,7 +131,7 @@ exports[`VSelect.ts should use scoped slot for selection generation 1`] = `
</div>
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`VSelect.ts should add color to selected index 1`] = `
</div>
<input autocomplete="on"
readonly="readonly"
type="text"
type="hidden"
aria-readonly="true"
>
</div>
Expand Down