• I notice that style="pointer-events: none;" has been added to items in the classic paragraph section of a page I’ve been updating for rather a long time. The page simply displays a list of academic and similar articles, with links and downloads. For example:

    <p>Pollock AM, Roderick P, Cheng KK, Pankhania B. <a style="pointer-events: none;" target="_blank" rel="noreferrer noopener" aria-label="Covid-19: why is the UK government ignoring WHO’s advice? (opens in a new tab)">Covid-19: why is the UK government ignoring WHO’s advice?</a> BMJ 2020;368:m1284. <a style="pointer-events: none;" target="_blank" rel="noreferrer noopener" aria-label="download (opens in a new tab)">download</a></p>

    Here both the web link and the download link have had pointer-events: none added. I’m not sure when.

    I’d be very grateful for any advice on how to address this. I’m hoping to avoid manually removing the code instance by instance – but perhaps that will be the solution!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, Yes, manually removing the code will be the solution!
    Until all of them removed, you can try adding the following JavaScript to your theme or in a code snippet plugin, such as?WPCode to make all the links clickable,

    <script>
    document.querySelectorAll(".entry-content p a").forEach(function (elem) {
        elem.style.pointerEvents = 'initial';
    })
    </script>
    Thread Starter GiacomoJames

    (@giacomojames)

    Hi Sajjad, thanks very for your reply. I’ve added the code using WPCode as you suggest, but interestingly it hasn’t worked. I know enough to like your code but not enough to understand why it isn’t working and whether that’s to do with how I’ve added it in WPCode. So I’ll follow your other suggestion and correct it manually – and maybe this is telling me it’s finally time to redesign this 10 or 11 year old page! Thanks again

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘style=”pointer-events: none;” added to classic paragraph’ is closed to new replies.