Last Comment Bug 333045 - select1 initialized by instance data on form load has wrong size
: select1 initialized by instance data on form load has wrong size
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug]
: Stephen Pride
Mentors:
http://marimba.murkworks.com/bkc/xfor...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-06 13:40 PDT by Brad Clements
Modified: 2016-07-15 14:46 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Demonstrates sizing bug (7.42 KB, application/xhtml+xml)
2006-04-06 13:41 PDT, Brad Clements
no flags Details
proposed patch (2.20 KB, patch)
2006-04-08 12:07 PDT, Olli Pettay [:smaug]
aaronr: review+
allan: review+
Details | Diff | Splinter Review
select1 resizing is not correct inside repeats (3.64 KB, application/xhtml+xml)
2006-04-10 11:54 PDT, Brad Clements
no flags Details

Description Brad Clements 2006-04-06 13:40:31 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

A select1 element whose items are loaded from an itemset, and that has
instance data selecting a matching item in that set, has the wrong width
when the form is loaded.

The only way to get the correct width is to use setvalue to set the instance data to null. A subsequent setvalue can be used to re-select the correct value.

Reproducible: Always

Steps to Reproduce:
1. Load referenced url or the attached demonstration file.
2. Note that in section #2 the selects have the wrong width


Actual Results:  
The select1 elements are too narrow. Almost as if their size is determined by the instance data, and not by the itemset choices.

Expected Results:  
The proper width should be used to reflect the actual choices.

I am using xforms 0.4 extension. Note that section 3 of the demonstration file shows using setvalue as a work-around for this problem.

However I play to use these selects in a repeat, so setvalue isn't a realistic workaround.
Comment 1 Brad Clements 2006-04-06 13:41:04 PDT
Created attachment 217474 [details]
Demonstrates sizing bug
Comment 2 Olli Pettay [:smaug] 2006-04-08 12:07:45 PDT
Created attachment 217689 [details] [diff] [review]
proposed patch

Need to refresh the width of the select1 in few more places.
Comment 3 Brad Clements 2006-04-10 11:54:12 PDT
Created attachment 217885 [details]
select1 resizing is not correct inside repeats

This attachment was tested against 0.5RC (2006-4-09). When adding a new repeat template via "add" button, the 2nd filtered select1 in the first template ends up either with the wrong width, and/or no selected choice.
Comment 4 Brad Clements 2006-04-10 12:06:34 PDT
Please disregard most recent attachment. I have opened #333464 instead.

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