Hi there.
Been digging in the Editor component.
I noticed that it didn't render the popup color editors correctly when the page needed to scroll.
If a page fitted in the container space, all OK, if not then the coordinates for the popups would always be relatively to the page size and not the client visible area.

I investigated the dojo source to see where the problem came from and saw that it was due to the following:

In dojo's ColorPalette.js the...

    showDialog: function (e) {
        dojo.widget.html.ToolbarColorDialog.superclass.showDialog.call (this, e);
        var x = dojo.html.getAbsoluteX(this.domNode);
        var y = dojo.html.getAbsoluteY(this.domNode) + dojo.html.getInnerHeight(this.domNode);
        this.dialog.showAt(x, y);
    },

...is the code that activates the popup color dialog.
The dojo.html.getAbsoluteX and dojo.html.getAbsoluteY are the ones that calculate the coordinates, but they are not instructed to take into account the scroll feature.
The code should be:

    showDialog: function (e) {
        dojo.widget.html.ToolbarColorDialog.superclass.showDialog.call(this, e);
        var x = dojo.html.getAbsoluteX(this.domNode, true);
        var y = dojo.html.getAbsoluteY(this.domNode, true) + dojo.html.getInnerHeight(this.domNode);
        this.dialog.showAt(x, y);
    },

...and it works perfectly.

Since Tacos does not use the latest dojo package, I thought I should post this here.
What should I do with this info? Have you allready noticed this? Will you pick it up from here?

I created a workaround in my own Editor component since I wanted a normal input like component and not an AJAX listener based one, but the problem affects both implementations.

Regards,


--
Pedro Viegas

Reply via email to