Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 139972 Details for
Bug 279460
[TableViewer] Scrolling problem when turning on editing support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
new version proposed to qooxdoo developers
WidgetScroll2.txt (text/plain), 3.61 KB, created by
Tim Buschtoens
on 2009-06-24 06:41:16 EDT
(
hide
)
Description:
new version proposed to qooxdoo developers
Filename:
MIME Type:
Creator:
Tim Buschtoens
Created:
2009-06-24 06:41:16 EDT
Size:
3.61 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.qx.build >Index: source/class/qx/html/Scroll.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/releng/org.eclipse.rap.qx.build/source/class/qx/html/Scroll.js,v >retrieving revision 1.1 >diff -u -r1.1 Scroll.js >--- source/class/qx/html/Scroll.js 10 Dec 2008 16:57:52 -0000 1.1 >+++ source/class/qx/html/Scroll.js 24 Jun 2009 10:18:08 -0000 >@@ -75,6 +75,52 @@ > } > > 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 >+ * >+ * @type static >+ * @param el {Element} html-element >+ * @return {void} >+ */ >+ enableScrolling : function(el) >+ {; >+ qx.html.EventRegistration.removeEventListener(el, "scroll", this._onscroll); >+ }, >+ >+ >+ /** >+ * Handler for the scroll-event >+ * >+ * @type static >+ * @param ev {event} scroll-event >+ * @return {void} >+ */ >+ _onscroll : function(ev) >+ { >+ var el = ev.target || ev.srcElement; >+ if(ev.scrollLeft != 0 || ev.scrollTop != 0) { >+ el.scrollLeft = 0; >+ el.scrollTop = 0; >+ } > } > } > }); >Index: source/class/qx/ui/core/Widget.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/releng/org.eclipse.rap.qx.build/source/class/qx/ui/core/Widget.js,v >retrieving revision 1.1 >diff -u -r1.1 Widget.js >--- source/class/qx/ui/core/Widget.js 10 Dec 2008 16:57:54 -0000 1.1 >+++ source/class/qx/ui/core/Widget.js 24 Jun 2009 10:18:11 -0000 >@@ -1210,7 +1210,66 @@ > document.body.removeChild(t); > }, > >- _idCounter : 0 >+ _idCounter : 0, >+ >+ >+ >+ >+ >+ >+ /* >+ --------------------------------------------------------------------------- >+ SCROLL-BLOCKER >+ --------------------------------------------------------------------------- >+ */ >+ >+ /** >+ * Disables browser-native scrolling >+ * >+ * @type static >+ * @param widget {widget} widget to diable scrolling for >+ * @return {void} >+ */ >+ disableScrolling : function(widget) >+ { >+ var el = widget._getTargetNode(); >+ if(el) { >+ qx.html.Scroll.disableScrolling(el); >+ } else { >+ widget.addEventListener("appear", this._blockScrollingOnAppear, this); >+ } >+ }, >+ >+ /** >+ * Re-enables browser-native scrolling >+ * >+ * @type static >+ * @param widget {widget} widget to re-enable scrolling for >+ * @return {void} >+ */ >+ enableScrolling : function(widget) >+ { >+ var el = widget._getTargetNode(); >+ if(el) { >+ qx.html.Scroll.enableScrolling(el); >+ } else { >+ widget.removeEventListener("appear", this._blockScrollingOnAppear, this); >+ } >+ }, >+ >+ /** >+ * Handler needed for the delayed node-creation >+ * >+ * @type static >+ * @param ev {Event} The "appear"-event >+ * @return {void} >+ */ >+ _blockScrollingOnAppear : function(ev) >+ { >+ var widget = ev.getTarget(); >+ widget.removeEventListener("appear", this._blockScrollingOnAppear, this); >+ this.disableScrolling(widget); >+ } > > }, >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 279460
:
138566
|
139020
| 139972 |
139973