diff --git a/accessible/field-segment.component.js b/accessible/field-segment.component.js index e42ab9f60..d14e52303 100644 --- a/accessible/field-segment.component.js +++ b/accessible/field-segment.component.js @@ -70,7 +70,7 @@ blocklyApp.FieldSegmentComponent = ng.core.Component({ this.notificationsService = notificationsService; this.dropdownOptions = []; }], - ngOnInit: function() { + ngDoCheck: function() { if (this.isDropdown()) { var rawOptions = this.mainField.getOptions_(); this.dropdownOptions = rawOptions.map(function(valueAndText) { diff --git a/accessible/tree.service.js b/accessible/tree.service.js index 90cfcdf5b..bbd2e71a5 100644 --- a/accessible/tree.service.js +++ b/accessible/tree.service.js @@ -484,8 +484,9 @@ blocklyApp.TreeService = ng.core.Class({ // Return the focus to the workspace tree containing the input field. document.getElementById(treeId).focus(); - // Note that Tab events are allowed to propagate through. - if (e.keyCode == 27) { + // Note that Tab and Enter events stop propagating, this behavior is + // handled on other listeners. + if (e.keyCode == 27 || e.keyCode == 13) { e.preventDefault(); e.stopPropagation(); }