mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 06:24:23 +01:00
Fix broken buttons by not hijacking click event without data-href attribute (#1081)
* Fix broken buttons by not hijacking click event without `data-href` attribute
This commit is contained in:
@@ -24,7 +24,7 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$("tr").click(function() {
|
||||
$("tr[data-href]").click(function() {
|
||||
var sel = getSelection().toString();
|
||||
if (!sel) {
|
||||
var href = $(this).attr("data-href");
|
||||
@@ -35,7 +35,7 @@ $(function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
$("tr a, button").click(function(e) {
|
||||
$("tr[data-href] a, tr[data-href] button").click(function(e) {
|
||||
// TODO: This is a hack to allow modal close buttons to work
|
||||
if (!$(this).attr("data-dismiss")) {
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user