Hi Marco!
Normally I would say, "QxDom.getComputedPageBoxTop" should respect
scrollings, too. This was the original intention. If this isn't working
we should fix this there instead of changing each class which is relying
on the features of this method.
Is this problem reproduce able cross-browser? Have you tested this in
Firefox, IE and Opera?
Thank you for your support.
Sebastian
Marco Emiliozzi schrieb:
> Sorry for the traffic, but I've found one of the solution I've proposed
> wasn't 100% right.
>
> [...]
> 1) Placing a QxComboBox inside a scrollable parent widget causes the popup
> from the QxComboBox to appear in a wrong position: it doesn't consider the
> scroll position of the parent widget.
> [...]
>
> With my old code the parent widget's scroll is considered, but not the
> scroll from all the ancestors of the QxComboBox. Using a _openPopup function
> like the following should fix the problem:
>
> proto._openPopup=function(){
> var p=this._popup;
> var el=this.getElement();
> if(!p.isCreated())
> {
> this.createDispatchEvent("beforeInitialOpen");
> };
> if(this._list.getChildrenLength()==0)
> {
> return;
> };
>
> var totalScrollLeft = 0;
> var totalScrollTop = 0
> var tmpWidget = this;
>
> while (tmpWidget.getParent())
> {
> totalScrollLeft += tmpWidget.getParent().getScrollLeft();
> totalScrollTop += tmpWidget.getParent().getScrollTop();
>
> tmpWidget = tmpWidget.getParent();
> }
>
> p.setLeft(QxDom.getComputedPageBoxLeft(el)+1 - totalScrollLeft);
>
> p.setTop(QxDom.getComputedPageBoxTop(el)+QxDom.getComputedBoxHeight(el) -
> totalScrollTop);
> p.setWidth(this.getBoxWidth()-2);
> p.setParent(this.getTopLevelWidget());
> p.show();
> this._oldSelected=this.getSelected();
> this.setCapture(true);
> };
>
> Sorry again for the double mail.
>
>
>
> _______________________________________________
> Qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel