I have built an ACF Block that loads posts in a grid. Each post in the grid is clickable. Working fine except that in the editor you can accidentally activate the links taking you off to the posts while you are trying to edit.
In order to prevent the clicks, I’ve implemented the following code but I can’t get any jquery to apply, although I can confirm the file is definitely loading in the header. I realise you can load js using register_block_type(), but as I want to prevent clicks on any links on any blocks in the editor, it makes sense to enqueue from functions.php.