Skip to content

Commit

Permalink
Fix search box width issue for firefox. EMC-330
Browse files Browse the repository at this point in the history
  • Loading branch information
Rex Lai committed Nov 15, 2024
1 parent 73018f3 commit 672f432
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/search/src/views/FacetsPanelView.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export default Backbone.View.extend({
if (!searchFacets.data('select2')) {
searchFacets.select2({
theme: 'bootstrap-5',
width: '100%',
width: () => {
const userAgent = navigator.userAgent.toLowerCase()
return (userAgent.indexOf('firefox') > -1) ? '97%' : '99%'
},
selectionCssClass: 'select2--large',
dropdownCssClass: 'select2--large',
templateSelection: e => { return e.text.split(' (')[0] }
Expand Down

0 comments on commit 672f432

Please sign in to comment.