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.
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.
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?
Created attachment 263957 [details] [diff] [review] patch This change backs out the lines that are causing the problem.
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.