Skip to content

Commit

Permalink
Fix admin menu icon picker modal (BS5 regression) (#11787)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skrypt authored May 31, 2022
1 parent e2a2734 commit ef91f3f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ var iconPickerVue = new Vue({
el: '#iconPickerVue',
data: {
targetInputField: '',
targetIconTag: ''
targetIconTag: '',
iconPickerModal: null,
},
mounted: function () {
var self = this;
Expand All @@ -32,12 +33,10 @@ var iconPickerVue = new Vue({
$('#' + self.targetIconTag).replaceWith('<i id="' + self.targetIconTag + '" class="'+ selected + '"></i>')
}

var iconPickerModal = new bootstrap.Modal($("#iconPickerModal"), {
backdrop: 'static',
keyboard: false
});

iconPickerModal.show();
if (self.iconPickerModal != null)
{
self.iconPickerModal.hide();
}
});

},
Expand All @@ -46,12 +45,14 @@ var iconPickerVue = new Vue({
this.targetInputField = targetInputField;
this.targetIconTag = targetIconTag;

var iconPickerModal = new bootstrap.Modal($("#iconPickerModal"), {
backdrop: 'static',
keyboard: false
});
if (this.iconPickerModal == null)
{
this.iconPickerModal = new bootstrap.Modal($("#iconPickerModal"), {
keyboard: false
});
}

iconPickerModal.show();
this.iconPickerModal.show();
}
}
})
})

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit ef91f3f

Please sign in to comment.