Note: There are a few cases of duplicates in user autocompletion which are being worked on.

switch @selected not working inside repeats

RESOLVED WONTFIX

Status

Core Graveyard
XForms
RESOLVED WONTFIX
11 years ago
a year ago

People

(Reporter: Allan Beaufour, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

2.35 KB, application/xhtml+xml
Details
(Reporter)

Description

11 years ago
It seems like the @selected attribute it not obeyed when a switch is inside a repeat.
(Reporter)

Comment 1

11 years ago
Created attachment 224037 [details]
Testcase

Comment 2

10 years ago
Debugged this a bit.  The problem is that switch isn't handling the insertion of cases the best.  And case doesn't handle being inserted well at all.  It only sets its selected state (mCachedSelectedAttr) during DoneAddingChildren which won't get called in the case of repeat templating since it isn't going through the parser.  But to make this work correctly we need to keep in mind the comments in bug 302497 (which, in the end, is probably a duplicate of this bug but we should probably make sure that the testcases for both work when the fix is added).  If the repeat contents of a switch is wiped out and replaced due to a repeat rebuilding (caused by a change in the bound nodeset), we need to remember the currently selected case inside the switch and not just go by @selected on the case.

We should also put a test for repeat state inside nsXFormsSwitchElement::Init() and if it is eType_Template, we shouldn't bother doing any work.

Updated

10 years ago
Depends on: 302497
RIP xforms
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.