Skip to content

Commit 9a7e242

Browse files
committed
Remove rule's details modal dialog element after hiding
Elements inside modal dialog interfere with the rest of the document (as they are just a partial clone of the DOM, with same IDs etc.)
1 parent 8dae218 commit 9a7e242

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

xsl/xccdf-resources.xsl

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

xsl/xccdf-resources/openscap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
function openRuleDetailsDialog(rule_result_id)
22
{
3-
$("#detail-modal").remove();
4-
53
/*DO NOT remove the aria-hidden="false" attribute from the following lines!
64
This attribute ensures that rule detail can be accessed by accessibility technologies such as screenreaders.*/
75
var closebutton = $('<button type="button" class="close btn btn-sm btn-default" data-dismiss="modal" aria-hidden="false" title="Close">&#x274c;</button>');
@@ -16,6 +14,9 @@ function openRuleDetailsDialog(rule_result_id)
1614
closebutton.css( { "margin-top" : "-=23px" } );
1715
$("#detail-modal-body").append(clone);
1816

17+
$('#detail-modal').on('hidden.bs.modal', function (e) {
18+
$("#detail-modal").remove();
19+
})
1920
$("#detail-modal").modal();
2021

2122
return false;

0 commit comments

Comments
 (0)