Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325091 - [Tree] Broken horizontal scrolling in FF
Summary: [Tree] Broken horizontal scrolling in FF
Status: VERIFIED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 1.4 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 320597
  Show dependency tree
 
Reported: 2010-09-13 05:30 EDT by Ivan Furnadjiev CLA
Modified: 2010-10-13 13:28 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot (26.63 KB, image/png)
2010-09-13 05:31 EDT, Ivan Furnadjiev CLA
no flags Details
Snippet to reproduce it (8.07 KB, text/plain)
2010-09-13 05:31 EDT, Ivan Furnadjiev CLA
no flags Details
"improved" snipped (9.11 KB, text/x-java)
2010-10-13 10:07 EDT, Tim Buschtoens CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Furnadjiev CLA 2010-09-13 05:30:12 EDT
If you have a tree with columns and the content has been scrolled by the horizontal scrollbar, the tree layout get broken after page reload.
Comment 1 Ivan Furnadjiev CLA 2010-09-13 05:31:09 EDT
Created attachment 178724 [details]
Screenshot

Reproducible with FF 3.6.9 on Windows and MAC.
Comment 2 Ivan Furnadjiev CLA 2010-09-13 05:31:54 EDT
Created attachment 178725 [details]
Snippet to reproduce it
Comment 3 Tim Buschtoens CLA 2010-10-13 05:33:42 EDT
Note that i was unable to reproduce this on my windows machine, but under Mac OS X (same FF version).
Comment 4 Tim Buschtoens CLA 2010-10-13 06:53:41 EDT
There are more issues with the horizontal scrolling: Setting scrollLeft (via showColumn) with the first request or while the tree is not visible will have no effect or produce a JS error. Also, the columnHeader will not be scrolled correctly if it is made visible via setHeaderVisible after the Tree has been created and scrolled. 

I won't open new bugs for these, as this can all be fixed with one additional "onAppear" listener in Tree.js.

Note that these additional issues are bugs in the Tree.js, while the original issue with the wrong offset after reload is veryl likely a Firefox bug.
Comment 5 Tim Buschtoens CLA 2010-10-13 10:07:10 EDT
Created attachment 180768 [details]
"improved" snipped

This is a "more risky" version of the snippet: It scrolls an invisible Table with an invisible header on the first request. (Doubleclick the shell to make the table visible and click the tree to make the header visible.) Only if both the clientArea and the header are scrolled to column 12 on appear does the tree work correctly.
Comment 6 Tim Buschtoens CLA 2010-10-13 10:16:23 EDT
Note: I found a similar bug in IE that lets this test fail:
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
      var tree = this._createDefaultTree();
      tree.setItemMetrics( 0, 0, 1000, 0, 0, 0, 500 );
      testUtil.flush();
      tree.hide();
      testUtil.flush();
      tree.setScrollLeft( 160 );
      tree.show();
      assertEquals( 160, tree._horzScrollBar.getValue() );
      assertEquals( 160, tree._clientArea.getScrollLeft() );      
      tree.destroy();

The second assertEquals gets a "0" not "160". However, the slightest changes (like making the header visible) to the test and it is green again. I was also unable to reproduce this problem in an actual RAP application so i will comment the test in TreeTest.js for now.
Comment 7 Tim Buschtoens CLA 2010-10-13 10:25:41 EDT
Fixed in CVS HEAD.

Fixed in Tree.js and added tests to TreeTest.js.
Comment 8 Ivan Furnadjiev CLA 2010-10-13 13:28:15 EDT
Did a testing under FF 3.6.10 and IE8 (Windows 7)... works fine.