Added colour and date editor auto close on selection.

This commit is contained in:
Beka Westberg
2019-06-11 15:35:18 -07:00
committed by Neil Fraser
parent 4e1224dbab
commit bf6d621c63
2 changed files with 2 additions and 0 deletions

View File

@@ -291,6 +291,7 @@ Blockly.FieldColour.prototype.onClick_ = function(e) {
var colour = cell && cell.label;
if (colour !== null) {
this.setValue(colour);
Blockly.DropDownDiv.hideIfOwner(this);
}
};

View File

@@ -252,6 +252,7 @@ Blockly.FieldDate.prototype.dropdownDispose_ = function() {
Blockly.FieldDate.prototype.onDateSelected_ = function(event) {
var date = event.date ? event.date.toIsoString(true) : '';
this.setValue(date);
Blockly.DropDownDiv.hideIfOwner(this);
};
/**