When you right click on a block and you select the option Delete block, it should delete one block.

Right clicking on a hat block uses the message Delete block but it deletes the whole stack. Either the message should indicate that more blocks will be deleted, or only delete the hat block.
Note clicking on the forever when it contains a block the context menu says Delete 2 blocks.
MacOS Chrome
Presumably, the blocks that come "after" a hat block are really children of that hat block, and so are deleted by this chunk of the code: https://github.com/LLK/scratch-blocks/blob/b63e5c62d3c3b88ddde3df1d4062a5432b5a116c/core/block.js#L287-L290
Probably a special-case for hat blocks would be the most practical here; I think it at would take less work than rewriting hat blocks so that blocks are considered "connected" instead of children!
The special case should be here: https://github.com/LLK/scratch-blocks/blob/develop/core/contextmenu.js#L220
@rachel-fenichel I think your "special case should be here" describes changing the number of blocks in the context menu option, whereas mine is (maybe not very clearly) about deleting just the hat block instead of its children. IMO mine makes more sense, because users will intuitively expect that "that option" = "delete just this block", from having used it on plenty of not-hat blocks.
Good point--where the special case goes will depend on which behaviour they pick.
I checked and the current behavior (delete the whole stack) is consistent with Scratch 2.0. So the fix is probably to change the message so that it conveys that it will delete the number of blocks in the stack. (In 2.0 it just says 'delete').
@chrisgarrity you're right, but this is a case where we can make a change so that the menu option is more intuitive and useful in Scratch 3.0. Anyway, you aren't exactly right, because in fact the delete right-click option, in 2.0, deletes following blocks from any block; for example right-click deleting "move 10 steps" in "move 10 steps, turn 15 degrees" will delete both blocks, whereas in 3.0 (as intended) it will only delete the "move 10 steps" block.
My understanding is that "delete" in the context menu is designed so that you don't have to perform a three step process to delete a single block:
With a hat block, you can just drag the entire script into the trash if that's what you want to do. If you, however, want to swap the event which triggers the action (e.g. arrow keys vs green flag), there should be a quick way to do that.
Thanks @joker314. Agreed!
/cc @carljbowman @kathymakes
Not too sure, but this may be a duplicate of #245. https://github.com/LLK/scratch-blocks/issues/245#issuecomment-376341121 describes a potential way to look into fixing this. More importantly, the new PR #1814 probably fixes this issue too.
Most helpful comment
My understanding is that "delete" in the context menu is designed so that you don't have to perform a three step process to delete a single block:
With a hat block, you can just drag the entire script into the trash if that's what you want to do. If you, however, want to swap the event which triggers the action (e.g. arrow keys vs green flag), there should be a quick way to do that.