fix(modal): fix close button display none override and prettier format v1.3.3

This commit is contained in:
Enes Yakıştır
2026-08-29 23:09:14 +03:00
parent 85340b85c6
commit b71e2a83a0
3 changed files with 26 additions and 8 deletions
+18 -5
View File
@@ -1406,7 +1406,8 @@
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// 8. FULL YOUTUBE SEARCH & VOICE MODAL ENGINE (v1.3.2 - Clean Generic Labels)
// --------------------------------------------------------------------------
// 8. FULL YOUTUBE SEARCH & VOICE MODAL ENGINE (v1.3.3 - Guaranteed Close Fix)
// --------------------------------------------------------------------------
var activeVoiceRec = null;
var isVoiceListening = false;
@@ -1421,7 +1422,6 @@
modal.setAttribute('role', 'dialog');
modal.setAttribute('aria-modal', 'true');
modal.setAttribute('aria-labelledby', 'yaktube-modal-search-title');
modal.style.display = 'none';
modal.innerHTML =
'<div class="yaktube-modal-search-card">' +
@@ -1484,7 +1484,9 @@
});
// Close on Back button or Escape
backBtn.addEventListener('click', function () {
backBtn.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
closeFullSearchModal();
});
@@ -1540,6 +1542,7 @@
function openFullSearchModal(initialQuery, autoStartVoice) {
var modal = createFullSearchModal();
modal.classList.add('yaktube-modal-open');
modal.style.display = 'flex';
var inp = modal.querySelector('#yaktube-modal-input');
@@ -1562,9 +1565,19 @@
function closeFullSearchModal() {
var modal = document.getElementById('yaktube-full-search-modal');
if (modal) modal.style.display = 'none';
if (modal) {
modal.classList.remove('yaktube-modal-open');
modal.style.display = 'none';
}
stopVoiceInsideModal();
announce('Arama penceresi kapatıldı.');
var trigger = document.querySelector('.yaktube-search-trigger-pill');
if (trigger) {
try {
trigger.focus();
} catch (e) {}
}
}
function toggleVoiceInsideModal() {
@@ -1763,7 +1776,7 @@
// Escape: Close Full Search Modal
else if (e.key === 'Escape' || e.keyCode === 27) {
var modal = document.getElementById('yaktube-full-search-modal');
if (modal && modal.style.display === 'flex') {
if (modal && modal.classList.contains('yaktube-modal-open')) {
e.preventDefault();
closeFullSearchModal();
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "peertube-plugin-yaktube-ondemand",
"version": "1.3.2",
"version": "1.3.3",
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube",
"main": "main.js",
"clientScripts": [
+7 -2
View File
@@ -412,7 +412,8 @@ my-header .action-buttons {
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* YOUTUBE FULL SEARCH & VOICE MODAL (v1.3.1 - Sleek Trigger Pill) */
/* -------------------------------------------------------------------------- */
/* YOUTUBE FULL SEARCH & VOICE MODAL (v1.3.3 - Display Fix) */
/* -------------------------------------------------------------------------- */
/* Header Search Trigger Container */
@@ -522,11 +523,15 @@ my-search-typeahead,
background: rgba(0, 0, 0, 0.82) !important;
backdrop-filter: blur(12px) !important;
z-index: 999999 !important;
display: flex !important;
display: none;
flex-direction: column !important;
align-items: center !important;
justify-content: flex-start !important;
padding-top: 40px !important;
}
.yaktube-full-search-modal.yaktube-modal-open {
display: flex !important;
animation: yaktube-fade-in 0.2s ease-out !important;
}