New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redactor link 'open in new window' checkbox missing #265

Closed
wesort opened this Issue Dec 20, 2015 · 8 comments

Comments

Projects
None yet
9 participants
@wesort

wesort commented Dec 20, 2015

In a Redactor field, use link button to open modal to insert URL and checkbox to "open in new window" but the actual checkbox is missing.

Statamic V2
v2 - checkbox missing

Statamic V1
v1 - checkbox present

@wesort

This comment has been minimized.

wesort commented Mar 2, 2016

FYI: While waiting for a fix on this I've found a vanilla js solution that suits my needs.

This opens all external links in a new tab/window (adds in target="_blank" to all a tags)

<script>
  function externalLinks() {
  for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) {
    var b = c[a];
    b.getAttribute("href") && b.hostname !== location.hostname && (b.target = "_blank")
  }
}
;
externalLinks();
</script>
@Chris-May

This comment has been minimized.

Chris-May commented Mar 23, 2016

Looks like all checkboxes are getting display:none'ed via:

.daterange .dr-input[type="checkbox"], .form-control[type="checkbox"], .markdown-fieldtype .CodeMirror[type="checkbox"], .environment-field[type="checkbox"], .redactor-editor[type="checkbox"], input[type="checkbox"], input.slug[type="checkbox"]:focus, input.slug[type="checkbox"]:hover, textarea[type="checkbox"], trix-editor[type="checkbox"] {
    display: none;
}

Poking at the scss, there's a chance a one-liner would fix it in redactor.scss:582

#redactor-modal input[type="radio"],
#redactor-modal input[type="checkbox"] {
  display: inline-block; /* <--- line 582 */
  position: relative;
  top: -1px;
}
@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Jul 13, 2016

Bug is back. Alright.

@jasonvarga jasonvarga reopened this Jul 13, 2016

@PhilippeGauthier

This comment has been minimized.

PhilippeGauthier commented Jul 13, 2016

Looks like the opacity and left styles are hiding it. Maybe targeted unintentionally? :

.daterange [type=checkbox].dr-input, .form-control[type=checkbox], .markdown-fieldtype [type=checkbox].CodeMirror, [type=checkbox].environment-field, [type=checkbox].redactor-editor, input[type=checkbox], input[type=checkbox].slug:focus, input[type=checkbox].slug:hover, textarea[type=checkbox], trix-editor[type=checkbox] {
    opacity: 0;
    position: absolute;
    left: -9999px;
@steenkamp-adnet

This comment has been minimized.

steenkamp-adnet commented Aug 16, 2016

This issue still exists - will there be a fix implemented in a future release?

screen shot 2016-08-16 at 10 34 01 am

Thanks!

@lesaff

This comment has been minimized.

lesaff commented Aug 16, 2016

I've incorporated a css fix to this issue in my RedactorPlugins addon. In case anyone need this right now.

@dannyuk1982

This comment has been minimized.

dannyuk1982 commented Aug 24, 2016

Add this at the end of /statamic/resources/dist/css/cp.css

#redactor-modal input[type=checkbox] { opacity: 1 !important; left: 0 !important; position: relative !important; }

@dannyuk1982

This comment has been minimized.

dannyuk1982 commented Sep 13, 2016

Any ETA on this? Seems a very quick fix but it's quite a major problem when using the CP to create external links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment