Skip to content

Commit

Permalink
fix(blazor): forbid moving disabled block
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Aug 16, 2021
1 parent ccec1fc commit a106c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sitko.Blockly.Blazor/Forms/BlocklyForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ private void ValidateBlock(ContentBlock block)
}
}

protected bool CanMoveBlockUp(ContentBlock block) => OrderedBlocks.CanMoveUp(block);
protected bool CanMoveBlockUp(ContentBlock block) => block.Enabled && OrderedBlocks.CanMoveUp(block);

protected bool CanMoveBlockDown(ContentBlock block) => OrderedBlocks.CanMoveDown(block);
protected bool CanMoveBlockDown(ContentBlock block) => block.Enabled && OrderedBlocks.CanMoveDown(block);

protected Task MoveBlockUpAsync(ContentBlock block)
{
Expand Down

0 comments on commit a106c02

Please sign in to comment.