Community
Participate
Working Groups
}
return sum;
},
/**
* Disables browser-native scrolling
*
* @type static
* @param el {Element} html-element
* @return {void}
*/
disableScrolling : function(el)
{
this.enableScrolling(el);
el.scrollLeft = 0;
el.scrollTop = 0;
qx.html.EventRegistration.addEventListener(el, "scroll", this._onscroll);
* Re-enables browser-native scrolling
enableScrolling : function(el)
{;
qx.html.EventRegistration.removeEventListener(el, "scroll", this._onscroll);
* Handler for the scroll-event
* @param ev {event} scroll-event
_onscroll : function(ev)
var el = ev.target || ev.srcElement;
if(ev.scrollLeft != 0 || ev.scrollTop != 0) {
});
document.body.removeChild(t);
_idCounter : 0
_idCounter : 0,
/*
---------------------------------------------------------------------------
SCROLL-BLOCKER
* @param widget {widget} widget to diable scrolling for
disableScrolling : function(widget)
var el = widget._getTargetNode();
if(el) {
qx.html.Scroll.disableScrolling(el);
} else {
widget.addEventListener("appear", this._blockScrollingOnAppear, this);
* @param widget {widget} widget to re-enable scrolling for
enableScrolling : function(widget)
qx.html.Scroll.enableScrolling(el);
widget.removeEventListener("appear", this._blockScrollingOnAppear, this);
* Handler needed for the delayed node-creation
* @param ev {Event} The "appear"-event
_blockScrollingOnAppear : function(ev)
var widget = ev.getTarget();
this.disableScrolling(widget);