Skip to content

Commit 3a81470

Browse files
Double Bullet Point Fix
- Now the "keep adding bullet points" feature only works if the bullet point input element has focus - Now tabbing from the bullet point input to the add bullet point button works to only add 1 bullet point quickly
1 parent 99485cf commit 3a81470

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/bulletpoint.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ async function viewBulletpoints(container, taskID, projectID) {
105105
});
106106
});
107107
}
108+
108109
document.addEventListener('keypress', async (event) => {
109-
if (event.key === 'Enter'){
110+
if (event.key === 'Enter' && document.activeElement === bulletpointInput_el){
110111
if (bulletpointInput_el.classList.contains('input-error')){
111112
bulletpointInput_el.classList.remove('input-error');
112113
}
@@ -120,7 +121,7 @@ document.addEventListener('keypress', async (event) => {
120121
populateActiveBulletpoints();
121122
populateCompleteBulletpoints();
122123
bulletpointInput_el.value = '';
123-
}
124+
}
124125
}
125126
});
126127

0 commit comments

Comments
 (0)