Last Comment Bug 379508 - regression: choices in select causes selection to scroll out of view
: regression: choices in select causes selection to scroll out of view
Status: RESOLVED FIXED
: fixed1.8.0.12, fixed1.8.1.4
Product: Core
Classification: Components
Component: XForms (show other bugs)
: 1.8 Branch
: x86 All
: -- normal (vote)
: ---
Assigned To: aaronr
: Stephen Pride
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-02 13:09 PDT by aaronr
Modified: 2007-05-11 12:29 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (2.56 KB, application/xhtml+xml)
2007-05-02 13:09 PDT, aaronr
no flags Details
patch (3.47 KB, patch)
2007-05-06 17:50 PDT, aaronr
no flags Details | Diff | Review

Description aaronr 2007-05-02 13:09:42 PDT
Created attachment 263514 [details]
testcase

If you have items in a select that are scrolled out of view and among those is a xf:choices with an item in it, then when you select any item after the top five (an item that you have to scroll to see) and select it, then the select will scroll that item back out of view so that the top items are visible again.  However, the currently selected item should always be in view.

This problem only occurs in the 0.8 pre-release on the branches.  Doesn't occur on the trunk or in 0.7.
Comment 1 aaronr 2007-05-04 00:35:57 PDT
Looks like the problem is timing related.  We seem to be rebuilding the list every time (removing the options and re-inserting them).  By the end of refresh() the list is fully populated and the appropriate item is selected, but the select doesn't have a scroll thumb, yet.  So maybe it is the select that is scrolling inappropriately.

The reason that we regressed could be because we are rebuilding the list every time.  Maybe we didn't used to rebuild the list every time so we never saw the problem before.
Comment 2 aaronr 2007-05-06 17:21:39 PDT
The change that caused the issue comes from the patch for bug 339286.  The changes to xforms-xhtml.xml for labels where we do stuff like:

-                this._implicitContent.textContent = val;
                 this._explicitContent.style.display = 'none';
+                this._implicitContent.style.display = 'inline';
+                this._implicitContent.textContent = val;

But this is exactly how it looks in the trunk.  Should we back this part out or just live with it until we re-write selects for bug 372127 and bug 372197?
Comment 3 aaronr 2007-05-06 17:50:05 PDT
Created attachment 263957 [details] [diff] [review]
patch

This change backs out the lines that are causing the problem.
Comment 4 aaronr 2007-05-11 12:29:51 PDT
surkov verified that the changes causing the problems were made due to the select rewrite.  Since that rewrite isn't in the branches, we shouldn't have the changes.  So I checked this patch into the branches.

Note You need to log in before you can comment on or make changes to this bug.