fix(mobile): admin dropdown tap — event delegation zamiast querySelectorAll
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
175da94ef6
commit
9c1932dd0a
@ -2432,21 +2432,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Admin bar mobile touch support
|
||||
document.querySelectorAll('.admin-dropdown-trigger').forEach(function(trigger) {
|
||||
trigger.addEventListener('click', function(e) {
|
||||
if (window.innerWidth <= 768) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var dropdown = this.closest('.admin-dropdown');
|
||||
var wasOpen = dropdown.classList.contains('open');
|
||||
document.querySelectorAll('.admin-dropdown.open').forEach(function(d) { d.classList.remove('open'); });
|
||||
if (!wasOpen) dropdown.classList.add('open');
|
||||
}
|
||||
});
|
||||
});
|
||||
// Admin bar touch support (event delegation)
|
||||
document.addEventListener('click', function(e) {
|
||||
if (!e.target.closest('.admin-dropdown')) {
|
||||
var trigger = e.target.closest('.admin-dropdown-trigger');
|
||||
if (trigger) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var dropdown = trigger.closest('.admin-dropdown');
|
||||
var wasOpen = dropdown.classList.contains('open');
|
||||
document.querySelectorAll('.admin-dropdown.open').forEach(function(d) { d.classList.remove('open'); });
|
||||
if (!wasOpen) dropdown.classList.add('open');
|
||||
return;
|
||||
}
|
||||
if (!e.target.closest('.admin-dropdown-menu')) {
|
||||
document.querySelectorAll('.admin-dropdown.open').forEach(function(d) { d.classList.remove('open'); });
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user