mirror of
https://github.com/Radarr/Radarr
synced 2025-02-20 21:37:18 +00:00
Fixed: Donate button requiring two clicks to actually work.
Fixes #2958
This commit is contained in:
parent
e4ba48eb61
commit
3767bbec18
1 changed files with 9 additions and 10 deletions
|
@ -29,10 +29,17 @@ module.exports = Marionette.Layout.extend({
|
|||
|
||||
onClick : function(event) {
|
||||
var target = $(event.target);
|
||||
|
||||
var linkElement = target;
|
||||
//look down for <a/>
|
||||
var href = event.target.getAttribute('href');
|
||||
|
||||
if (!href && target.closest('a') && target.closest('a')[0]) {
|
||||
|
||||
linkElement = target.closest('a')[0];
|
||||
|
||||
href = linkElement.getAttribute('href');
|
||||
}
|
||||
|
||||
if (href && href.startsWith("http")) {
|
||||
return;
|
||||
}
|
||||
|
@ -40,15 +47,7 @@ module.exports = Marionette.Layout.extend({
|
|||
event.preventDefault();
|
||||
|
||||
//if couldn't find it look up'
|
||||
if (!href && target.closest('a') && target.closest('a')[0]) {
|
||||
|
||||
var linkElement = target.closest('a')[0];
|
||||
|
||||
href = linkElement.getAttribute('href');
|
||||
this.setActive(linkElement);
|
||||
} else {
|
||||
this.setActive(event.target);
|
||||
}
|
||||
this.setActive(linkElement);
|
||||
|
||||
if ($(window).width() < 768) {
|
||||
this.ui.collapse.collapse('hide');
|
||||
|
|
Loading…
Reference in a new issue