mirror of
https://github.com/google/blockly.git
synced 2026-01-19 14:57:12 +01:00
Stop some blocks from throwing errors in headless workspaces.
This commit is contained in:
@@ -257,7 +257,7 @@ Blockly.Blocks['controls_flow_statements'] = {
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
onchange: function(e) {
|
||||
if (this.workspace.isDragging()) {
|
||||
if (!this.workspace.isDragging || this.workspace.isDragging()) {
|
||||
return; // Don't change state at the start of a drag.
|
||||
}
|
||||
var legal = false;
|
||||
|
||||
@@ -843,7 +843,7 @@ Blockly.Blocks['procedures_ifreturn'] = {
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
onchange: function(e) {
|
||||
if (this.workspace.isDragging()) {
|
||||
if (!this.workspace.isDragging || this.workspace.isDragging()) {
|
||||
return; // Don't change state at the start of a drag.
|
||||
}
|
||||
var legal = false;
|
||||
|
||||
Reference in New Issue
Block a user