• Resolved mod4ps

    (@mod4ps)


    How can I hide the border / shadow around the Link when the modal is loaded?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Jensen

    (@dkjensen)

    @mod4ps That is the focus state of a link, the modal focuses on the first focusable element with the modal when it opens for accessibility.

    If you want to skip this behavior, you can add the following to your child theme functions.php file or in a snippet somewhere:

    /**
    * Prevents the light modal block from focusing on a specific element when it opens.
    *
    * @return void
    */
    add_action(
    'wp_enqueue_scripts',
    function () {
    wp_add_inline_script(
    'cloudcatch-light-modal-block-view-script',
    'window.lmbFocusableElements = "";',
    'before'
    );
    }
    );
    Thread Starter mod4ps

    (@mod4ps)

    Thank you David
    This is exactly the solution to my problem. Why should the focus status be displayed (with a shadow)? The status is usually displayed via the link settings (hover, focus) in the CSS.

    Plugin Author David Jensen

    (@dkjensen)

    Hi @mod4ps

    Your theme and/or browser is controlling the default focus behavior. This plugin is not opinionated on such styling and is not controlling that border/outline/box-shadow state.

    Thread Starter mod4ps

    (@mod4ps)

    Hi David
    Good to know! Thanks for solving the problem.

    Best regards
    Peter


Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘hide border/shadow’ is closed to new replies.