BUEditors placed within a vertical tab dont render correctly.

  • Text is all grey.
  • Black vertical line left of the edit area. Height is the whole browser window below the edit space.
  • Causes the page to have several hundred pixels of blank space at the bottom.
CommentFileSizeAuthor
bueditor_vertical_tabs_bug.jpg44.6 KBdoublejosh

Comments

doublejosh’s picture

BTW: This is in Chrome.

doublejosh’s picture

More info: the .bue-hl-layer bue-hl-colayer element gets a width of zero.

ufku’s picture

Category: bug » support

I'm marking this as support request because code highlighter is not a part of the project.

Can this be reproduced with a clean install + Vertical tabs?

doublejosh’s picture

Correct.
Confirmed that this problem DOES NOT exist on a fresh install without highlighting turned on.
Tested different setups and confirmed the problem is only with highlighting.

Also realized that if I click the highlighting button it repairs the zero width, which is on this element...
<div class="bue-hl-layer bue-hl-colayer" id="edit-field-info-0-value-bue-hl-colayer" style="width: 0px; ">

...SO that means it's the initial tpl code that's failing to properly get the width set for some reason..

js:
BUE.postprocess._turnOnHlight = function(E, $) {
  setTimeout(function(){E.highlight('html')});
};

It does run initially, and turns highlighting on, but width fails.

Sorry the bue.highlight.js file is a bit to dense for me. Any next steps I can help with?

ufku’s picture

Highlighter can only be set up on visible editor. Zero width is expected for hidden elements. You need to disable the tpl button that loads the highlighter on page load and use the hlight on/off button manually.

doublejosh’s picture

Hmm... the tpl button works fine on initially visible elements. It's lovely to have no-click highlighting.

I know other modules have had to deal with this: http://drupal.org/node/719714

Any thoughts about how to either: have one editor initially set and others (within tabs) require a click, or getting widths while it's still hidden?

ufku’s picture

Try replacing your initiator code with this:

js:
BUE.postprocess._turnOnHlight = function(E, $) {
  E.hltimer = setInterval(function() {
    if (E.textArea.offsetWidth) {
      clearInterval(E.hltimer);
      E.highlight('html');
    }
  }, 500);
};
doublejosh’s picture

You sir are a genius and a philanthropist!

Works perfectly.

ufku’s picture

Status: Active » Fixed

:)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.