Skip to content

Commit

Permalink
Fix preview message tab click under bootstrap 5
Browse files Browse the repository at this point in the history
Since the upgrade to Bootstrap 5 the preview message tab in the Message
News page stopped working because Bootstrap 5 doesn't use jQuery
anymore.

Co-authored-by: Jacob Michalskie <jacob.michalskie@suse.com>
  • Loading branch information
danidoni and hellcp-work committed Feb 22, 2023
1 parent b637d11 commit 9064019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/assets/javascripts/webui/write_and_preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$(document).ready(function(){
$('.write-and-preview').on('click', '.preview-message-tab:not(.active)', function (e) {
$('.write-and-preview').on('show.bs.tab', '.preview-message-tab:not(.active)', function (e) {
var messageContainer = $(e.target).closest('.write-and-preview');
var messageText = messageContainer.find('.message-field').val();
var messagePreview = messageContainer.find('.message-preview');
Expand Down

0 comments on commit 9064019

Please sign in to comment.