You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#115644 A class makes invisible a button in the editor

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Wednesday, 20 December 2023 12:32 GMT

ClaudioRomeo
In an article, I inserted this code:

<p style="text-align: center;"><a href="https://www.joomlacontenteditor.net/images/Articoli/0001_0050/0005/Studio_Il_loto_20231215_Cookie.pdf">
		<button class="btn"> <strong>Leggi l'informativa estesa</strong><br><small>sui cookie</small></button>
	</a></p>
And everything works well: when I click the button, the PDF document opens. If I add the modal class (by Regolar Labs) to the link:

<p style="text-align: center;"><a href="https://www.joomlacontenteditor.net/images/Articoli/0001_0050/0005/Studio_Il_loto_20231215_Cookie.pdf"  class="modal">
		<button class="btn"> <strong>Leggi l'informativa estesa</strong><br><small>sui cookie</small></button>
	</a></p>
in the frontend there is no problem at all, but in the backend editor (JCE) the button disappears. It is no longer visible, but it is still present (and working) in the Code tab. You can test the page here: www.studioilloto.it/info-legali/cookie The image shows the backend editor appearance: only a second button (with no modal class) is visible.

Attachments

Ryan
Adding the "modal" class to the front-end aritlce on your site also makes the link and button dissappear. This is caused by the following css in your template stylesheet, which is used by your template to display a modal window:

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}
When the modal is activated I would assume the script activating it would a class that changes the display property of the modal to "block".

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.