#10662 closed defect (fixed)
Claro theme breaks editor resize.
Reported by: | Jared Jurkiewicz | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Editor | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
The new Claro theme breaks the resizing of editor. This is most notible when using plugins like Find/Replace? and CollpasibleToolbar?, which end up resizing the editor due to layout changes on the toolbar.
The problem comes from the 10px padding they put on the div that contains the iframe (The center of the three divs), in the class: dijitEditorIframeContainer
The fix (so far), is that the layout function in Editor needs to be updated to account for possible padding there. I fixed it by doing:
layout: function(){ // summary: // Called from `dijit.layout._LayoutWidget.resize`. This shouldn't be called directly // tags: // protected // Converts the iframe (or rather the <div> surrounding it) to take all the available space // except what's needed for the header (toolbars) and footer (breadcrumbs, etc) var iframeHeight = (this._contentBox.h - (this.getHeaderHeight() + this.getFooterHeight() + dojo._getPadExtents(this.iframe.parentNode).h)) + "px"; this.editingArea.style.height = iframeHeight; if(this.iframe){ this.iframe.style.height="100%"; } this._layoutMode = true; },
subtracting off the padding extents of that div. This problem is seen in all browsers.
Assigning to Bill for his input.
Attachments (1)
Change History (9)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
... It also fouls up FullScreen?. Argh.
Will have to investigate that plugin too.
comment:3 Changed 11 years ago by
Thanks for catching this and working on it. The change to layout() looks good. Usually _getPadExtents() is coupled with _getMarginExtents(), maybe you want both of them, in case some new future theme wanted to add padding to that div (seems unlikely though).
comment:4 Changed 11 years ago by
PS: And getPadBorderExtents is used instead of getPadExtents, in case there's a border.
Changed 11 years ago by
Attachment: | fixSizing.patch added |
---|
Various patches to the editor to work with lucid.
comment:5 Changed 11 years ago by
comment:6 Changed 11 years ago by
comment:8 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Summary: | Lucid theme breaks editor resize. → Claro theme breaks editor resize. |
It's most notably visible because of that light blue border they put around the editor. It does not wrap the entire editor when resize() is called because tht 'padding' ends up making the editor h padding too tall. I first saw this when I had the CollapsibleToolbar? plugin combined with the breadcrumb plugin. The border did not remain wrapped aorund them when the editor changed content area size. With the above function fix, it did and looks correct (and shows correct in firebug when it highlights the editor div.)