1
0
Fork 0
mirror of synced 2024-05-21 05:02:37 +12:00

Fixed focus/blur bug

This commit is contained in:
Eldad Fux 2020-04-03 22:26:14 +03:00
parent 216589fed5
commit a74f35e11b
2 changed files with 11 additions and 5 deletions

View file

@ -32,7 +32,7 @@ const APP_EMAIL_SECURITY = 'security@localhost.test'; // Default security email
const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s';
const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 15;
const APP_CACHE_BUSTER = 69;
const APP_CACHE_BUSTER = 87;
const APP_VERSION_STABLE = '0.5.3';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_CACHE = '/storage/cache';

View file

@ -101,14 +101,20 @@
});
}
element.addEventListener("click", function(event) {
let target = findParent("a", event.target);
element.addEventListener('click', function(event) {
let targetA = findParent('a', event.target);
let targetB = findParent('button', event.target);
if (!target) {
if (!targetA && !targetB) {
return false; // no target
}
if (targetA && !targetA.href) {
// Just a normal click not an href
return false;
}
if (!target.href) {
if (targetB && !targetB.classList.contains('link')) {
// Just a normal click not an href
return false;
}