There is a small issue in the Webkit browsers where the IPE draghandle elements do not get the proper widths when they are shown for the first time in the IPE. Check out their right side here (http://drupal.org/files/panopoly-draghandle-widths.png). This corrects itself once the user edits/modifies any because they get repainted.

Comments

populist’s picture

Status: Active » Needs review
StatusFileSize
new995 bytes

Here is a patch that fixes the above problem. It basically does a "repainting" of the elements on init which forces Webkit (and I am going to guess IE) to readjust the widths and make these look right.

For bonus points, I also removed the logic to center the buttons in the IPE editor since they are no longer needed as per #1711302: Make "Add New Pane" an Icon with a Smaller Design

merlinofchaos’s picture

Why would we even be doing that in javascript? Shouldn'tw e just set position: relative in the css?

populist’s picture

Status: Needs review » Needs work

As best I can tell, the problem here is that when the IPE is enabled it adds new visibile markup to the page which makes some of the width calculations (as per my screenshots) need to be recalculated. In order to do this, we need to add CSS *after* the markup is made visible which will force a repaint.

That being said, there might be a better CSS approach since repaints can be slow (http://www.stubbornella.org/content/2009/03/27/reflows-repaints-css-perf...) and all we really need is the IPE controls to be aligned correctly.

populist’s picture

Status: Needs work » Needs review
StatusFileSize
new399 bytes
new160.1 KB

I did some more research here and found a pure CSS approach here that involved setting a width: 100% on the parent container which fixes the problem (http://drupal.org/files/panopoly-draghandle-widths-after.png).

merlinofchaos’s picture

Status: Needs review » Fixed

Committed and pushed.

Status: Fixed » Closed (fixed)

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

  • Commit f533a26 on 7.x-3.x, 7.x-3.x-i18n, 8.x-3.x authored by populist, committed by merlinofchaos:
    Issue #1735336 by populist: Fixed Panels IPE Drag Handles Have Improper...