Skip to content
Snippets Groups Projects
Commit 97a1ff50 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

check-in-place-select: try to work around select2 bug on firefox mobile

When selecting select2 shows the "loading.." state for a short time there
which shifts down the result list and makes the selection select the wrong
item.

Work around that by hiding the loading indicator after fetching the data is done
and allow it again once something is selected.
parent d84ef2ed
No related branches found
No related tags found
No related merge requests found
Pipeline #14445 passed
......@@ -168,6 +168,8 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(LitElement) {
};
},
processResults: function (data) {
that.$('#check-in-place-select-dropdown').addClass('select2-bug');
that.lastResult = data;
let transformed = that.jsonld.transformMembers(data, checkInPlaceContext);
const results = [];
......@@ -185,6 +187,8 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(LitElement) {
}
}
}).on("select2:select", function (e) {
that.$('#check-in-place-select-dropdown').removeClass('select2-bug');
// set custom element attributes
const identifier = e.params.data.id;
const maxCapacity = e.params.data.maximumPhysicalAttendeeCapacity;
......@@ -356,6 +360,10 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(LitElement) {
-webkit-appearance: none;
}
/* https://github.com/select2/select2/issues/5457 */
.select2-bug .loading-results {
display: none !important;
}
`
];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment