File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/bundle/Resources/public/js/scripts Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export class UserInvitationModal {
2626 this . fileInput = this . modal . querySelector ( '.ibexa-user-invitation-modal__file-input' ) ;
2727 this . fakeSubmitBtn = this . modal . querySelector ( '.ibexa-user-invitation-modal__fake-submit-btn' ) ;
2828 this . realSubmitBtn = this . modal . querySelector ( '.ibexa-user-invitation-modal__real-submit-btn' ) ;
29+ this . form = this . modal . querySelector ( '.ibexa-user-invitation-modal__form' ) ;
2930 this . lastScrolledToEntryWithIssue = null ;
3031
3132 this . attachEntryListeners = this . attachEntryListeners . bind ( this ) ;
@@ -443,6 +444,8 @@ export class UserInvitationModal {
443444 }
444445
445446 init ( ) {
447+ const ENTER_KEY_CODE = 13 ;
448+
446449 this . initialEntries = this . entriesContainer . querySelectorAll ( '.ibexa-user-invitation-modal__entry' ) ;
447450 this . entryCounter = this . initialEntries . length ;
448451
@@ -503,5 +506,15 @@ export class UserInvitationModal {
503506 ) ;
504507
505508 this . updateModalTitle ( ) ;
509+
510+ this . form . addEventListener (
511+ 'keydown' ,
512+ ( event ) => {
513+ if ( event . keyCode === ENTER_KEY_CODE ) {
514+ event . preventDefault ( ) ;
515+ }
516+ } ,
517+ false ,
518+ ) ;
506519 }
507520}
You can’t perform that action at this time.
0 commit comments