mirror of
https://github.com/google/blockly.git
synced 2026-01-26 10:10:08 +01:00
Revert calling onHide before the animation is complete to avoid double click issues. (#3202)
This commit is contained in:
committed by
Rachel Fenichel
parent
15a6fa7cb4
commit
863a4a52d9
@@ -263,7 +263,7 @@ Blockly.DropDownDiv.showPositionedByBlock = function(field, block,
|
||||
*/
|
||||
Blockly.DropDownDiv.showPositionedByField = function(field,
|
||||
opt_onHide, opt_secondaryYOffset) {
|
||||
var position = field.fieldGroup_.getBoundingClientRect();
|
||||
var position = field.getSvgRoot().getBoundingClientRect();
|
||||
// If we can fit it, render below the block.
|
||||
var primaryX = position.left + position.width / 2;
|
||||
var primaryY = position.bottom;
|
||||
@@ -574,11 +574,11 @@ Blockly.DropDownDiv.hide = function() {
|
||||
Blockly.DropDownDiv.animateOutTimer_ =
|
||||
setTimeout(function() {
|
||||
Blockly.DropDownDiv.hideWithoutAnimation();
|
||||
if (Blockly.DropDownDiv.onHide_) {
|
||||
Blockly.DropDownDiv.onHide_();
|
||||
Blockly.DropDownDiv.onHide_ = null;
|
||||
}
|
||||
}, Blockly.DropDownDiv.ANIMATION_TIME * 1000);
|
||||
if (Blockly.DropDownDiv.onHide_) {
|
||||
Blockly.DropDownDiv.onHide_();
|
||||
Blockly.DropDownDiv.onHide_ = null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user