Check whether current block is a block or an item and call different functions to handle right click event