Fixed wrong focus and suggestion drop down delay
This commit is contained in:
		@@ -251,11 +251,9 @@ function renderTags(imgIndex, tags) {
 | 
				
			|||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  input.addEventListener('blur', () => {
 | 
					  input.addEventListener('blur', () => {
 | 
				
			||||||
    setTimeout(() => {
 | 
					 | 
				
			||||||
    suggestionBox.style.display = 'none';
 | 
					    suggestionBox.style.display = 'none';
 | 
				
			||||||
    input.value = '';
 | 
					    input.value = '';
 | 
				
			||||||
    validateBtn.style.display = 'none';
 | 
					    validateBtn.style.display = 'none';
 | 
				
			||||||
    }, 150);
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // --- Validate button action ---
 | 
					  // --- Validate button action ---
 | 
				
			||||||
@@ -267,9 +265,10 @@ function renderTags(imgIndex, tags) {
 | 
				
			|||||||
      validateBtn.style.display = 'none';
 | 
					      validateBtn.style.display = 'none';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					 | 
				
			||||||
  input.focus();
 | 
					 | 
				
			||||||
  updateSuggestions();
 | 
					  updateSuggestions();
 | 
				
			||||||
 | 
					  if (!input.value.trim()) {
 | 
				
			||||||
 | 
					    suggestionBox.style.display = 'none';
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// --- Update tags in galleryImages array ---
 | 
					// --- Update tags in galleryImages array ---
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user