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 @@ -180,13 +180,15 @@ export class DsDynamicTagComponent extends DsDynamicVocabularyComponent implemen
180180 }
181181
182182 /**
183- * Add a new tag with typed text when typing 'Enter' or ',' or ';'
183+ * Add a new tag with typed text when typing 'Enter' or ','
184+ * Tests the key rather than keyCode as keyCodes can vary
185+ * based on keyboard layout (and do not consider Shift mod)
184186 * @param event the keyUp event
185187 */
186188 onKeyUp ( event ) {
187- if ( event . keyCode === 13 || event . keyCode === 188 ) {
189+ if ( event . key === 'Enter' || event . key === ',' ) {
188190 event . preventDefault ( ) ;
189- // Key: 'Enter' or ',' or ';'
191+ // Key: 'Enter' or ','
190192 this . addTagsToChips ( ) ;
191193 event . stopPropagation ( ) ;
192194 }
You can’t perform that action at this time.
0 commit comments