File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/main/resources/META-INF/frontend Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -329,12 +329,14 @@ class PaperChipInputAutocomplete extends ThemableMixin(PolymerElement) {
329329 }
330330
331331 _onKeyEnter ( ) {
332- if ( this . additionalItems || ( this . _inputValue != '' && this . _inputValue != undefined ) ) {
333- this . _saveTag ( this . _inputValue ) ;
334- this . required = false ;
335- this . autoValidate = false ;
336- this . _inputValue = '' ;
337- }
332+ if ( this . _inputValue != '' && this . _inputValue != undefined ) {
333+ if ( this . additionalItems || ( this . _filteredSource && this . _filteredSource . length == 1 && this . _filteredSource [ 0 ] . value == this . _inputValue ) ) {
334+ this . _saveTag ( this . _inputValue ) ;
335+ this . required = false ;
336+ this . autoValidate = false ;
337+ this . _inputValue = '' ;
338+ }
339+ }
338340 }
339341
340342 _onKeyBackspace ( event ) {
You can’t perform that action at this time.
0 commit comments