mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -1185,6 +1185,17 @@ Blockly.Flyout.prototype.createBlockFunc_ = function(originBlock) {
|
||||
} else {
|
||||
flyout.filterForCapacity_();
|
||||
}
|
||||
|
||||
// Re-render the blocks before starting the drag:
|
||||
// Force a render on IE and Edge to get around the issue described in
|
||||
// Blockly.Field.getCachedWidth
|
||||
if (goog.userAgent.IE || goog.userAgent.EDGE) {
|
||||
var blocks = block.getDescendants();
|
||||
for (var i = blocks.length - 1; i >= 0; i--) {
|
||||
blocks[i].render(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Start a dragging operation on the new block.
|
||||
block.onMouseDown_(e);
|
||||
Blockly.dragMode_ = Blockly.DRAG_FREE;
|
||||
|
||||
@@ -32,7 +32,6 @@ goog.provide('Blockly.Xml');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.userAgent');
|
||||
|
||||
|
||||
/**
|
||||
@@ -430,11 +429,6 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
|
||||
setTimeout(function() {
|
||||
if (topBlock.workspace) { // Check that the block hasn't been deleted.
|
||||
topBlock.setConnectionsHidden(false);
|
||||
// Force a render on IE and Edge to get around the issue described in
|
||||
// Blockly.Field.getCachedWidth
|
||||
if (goog.userAgent.IE || goog.userAgent.EDGE) {
|
||||
topBlock.render();
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
topBlock.updateDisabled();
|
||||
|
||||
Reference in New Issue
Block a user