mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
Added colour and date editor auto close on selection.
This commit is contained in:
committed by
Neil Fraser
parent
4e1224dbab
commit
bf6d621c63
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user