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 @@ -219,13 +219,15 @@ export class DsDynamicTagComponent extends DsDynamicVocabularyComponent implemen
219219 }
220220
221221 /**
222- * Add a new tag with typed text when typing 'Enter' or ',' or ';'
222+ * Add a new tag with typed text when typing 'Enter' or ','
223+ * Tests the key rather than keyCode as keyCodes can vary
224+ * based on keyboard layout (and do not consider Shift mod)
223225 * @param event the keyUp event
224226 */
225227 onKeyUp ( event ) {
226- if ( event . keyCode === 13 || event . keyCode === 188 ) {
228+ if ( event . key === 'Enter' || event . key === ',' ) {
227229 event . preventDefault ( ) ;
228- // Key: 'Enter' or ',' or ';'
230+ // Key: 'Enter' or ','
229231 this . addTagsToChips ( ) ;
230232 event . stopPropagation ( ) ;
231233 }
You can’t perform that action at this time.
0 commit comments