fix: toggle skill selection on repeated tap

Tapping the same skill tile again deselects it, removing the highlight
border and hiding the send bar input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
dj-oyu 2026-02-22 10:19:21 +09:00
parent 9f6aa867bd
commit 620eda2959

View file

@ -694,6 +694,12 @@ function renderSkillsFromData(data) {
el.querySelectorAll('.skill-item').forEach(function(item) {
item.addEventListener('click', function() {
if (selectedSkill === item.dataset.skill) {
item.classList.remove('selected');
selectedSkill = null;
document.getElementById('send-bar').style.display = 'none';
return;
}
el.querySelectorAll('.skill-item').forEach(function(i) { i.classList.remove('selected'); });
item.classList.add('selected');
selectedSkill = item.dataset.skill;