• Resolved timdenty

    (@timdenty)


    I’m seeing an issue with the modal close button not functioning.

    I can see that some attributes are being stripped from the output:

    Template code:
    <button class=”ttt-pnwc-close” aria-label=”Close modal” data-micromodal-close></button>

    Inspector code:
    <button class=”ttt-pnwc-close”></button>

    I have tested with other unnecessary plugins deactivated. Also tested without JS running.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Pablo Pacheco

    (@karzin)

    Hello,

    Are you using the free or premium version?

    Thread Starter timdenty

    (@timdenty)

    We’re using the free version

    Plugin Author Pablo Pacheco

    (@karzin)

    Probably some other plugin has edited your wp_kses_allowed_html filter, removing these attributes.

    Please, add this to your functions.php

    add_filter( 'wp_kses_allowed_html', function ( $html ) {
    	$html['button'] = array(
    		'disabled'         => true,
    		'name'             => true,
    		'type'             => true,
    		'value'            => true,
    		'aria-describedby' => true,
    		'aria-details'     => true,
    		'aria-label'       => true,
    		'aria-labelledby'  => true,
    		'aria-hidden'      => true,
    		'class'            => true,
    		'id'               => true,
    		'style'            => true,
    		'title'            => true,
    		'role'             => true,
    		'data-*'           => true,
    	);
    	return $html;
    } );

    and please tell me if it helps

    Thread Starter timdenty

    (@timdenty)

    Thanks for that. Yes it works, but only once I specify the ‘data-micromodal-close’ attribute explicitly in the array.

    Many thanks

    Plugin Author Pablo Pacheco

    (@karzin)

    Great ??
    Thanks for letting me know.

    If you could leave a tiny review I would really appreciate it

    Same issue happen with me also.. and I fixed it using @timdenty solution mentioned above.

    Plugin Author Pablo Pacheco

    (@karzin)

    Thanks for letting me know @aartikmundrisoft,
    I’ll try to add it on the plugin FAQ then

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Issue with closing modal’ is closed to new replies.