File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/app/shared/form/builder/ds-dynamic-form-ui/models/tag Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -220,13 +220,15 @@ export class DsDynamicTagComponent extends DsDynamicVocabularyComponent implemen
220220 }
221221
222222 /**
223- * Add a new tag with typed text when typing 'Enter' or ',' or ';'
223+ * Add a new tag with typed text when typing 'Enter' or ','
224+ * Tests the key rather than keyCode as keyCodes can vary
225+ * based on keyboard layout (and do not consider Shift mod)
224226 * @param event the keyUp event
225227 */
226228 onKeyUp ( event ) {
227- if ( event . keyCode === 13 || event . keyCode === 188 ) {
229+ if ( event . key === 'Enter' || event . key === ',' ) {
228230 event . preventDefault ( ) ;
229- // Key: 'Enter' or ',' or ';'
231+ // Key: 'Enter' or ','
230232 this . addTagsToChips ( ) ;
231233 event . stopPropagation ( ) ;
232234 }
You can’t perform that action at this time.
0 commit comments