Page 1 of 1

Disable opening new tab or pop-up when clicking block

Posted: Tuesday 25 January 2022 11:50
by cduijker
Goodmorning,

I would like to disable showing a new tab or popup when clicking on the news block.
Also disable opening a new tab when clicking on a frame block. (buienradar)

Is this possible?

Re: Disable opening new tab or pop-up when clicking block

Posted: Wednesday 02 February 2022 21:54
by Lokonli
assume you've defined your block in CONFIG.js via:

Code: Select all

blocks['news'] = {
   ...
}
then you can disable handling of click events by adding the following to custom.css:

Code: Select all

[data-id="news"].dt_block {
    pointer-events: none
}
or,
add the addClass block parameter:

Code: Select all

blocks['news'] = {
   addClass: 'noclick',
   ....
}
and add the following to custom.css:

Code: Select all

.noclick {
  pointer-events: none
}
Both methods also work for frames.

Re: Disable opening new tab or pop-up when clicking block

Posted: Sunday 06 February 2022 16:35
by cduijker
Thanks! that worked!