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:
parent
9f6aa867bd
commit
620eda2959
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue