Closed Bug 537881 Opened 15 years ago Closed 15 years ago

Tabs and other hidden elements appear only after check-uncheck (input with xsi:type="xsd:boolean" problem)

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sergeyreym, Assigned: sergeyreym)

References

()

Details

Attachments

(2 files, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.6 (KHTML, like Gecko) Chrome/4.0.266.0 Safari/532.6
Build Identifier: 3.7a1pre

This bug cought after fixing bug 525730.

Reproducible: Always

Steps to Reproduce:
Something is not yet right with these patches. 

1. go to http://www.mozilla.org/projects/xforms/samples/insurance_form/app_certificates.xhtml 
2. check "I agree"
3. now the other "tabs" on top ("name and address", ...) should appear
4. uncheck it again and check it again -> now it works.

The same behavior can be seen on the "Evidence of Name" tab in the same form.
Summary: Tabs and other hidden elements appears only after second click. → Tabs and other hidden elements appear only after second click.
Summary: Tabs and other hidden elements appear only after second click. → Tabs and other hidden elements appear only after check-uncheck (triggers problem)
Attached file testcase
Simple testcase for this problem. According to file in link.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Tabs and other hidden elements appear only after check-uncheck (triggers problem) → Tabs and other hidden elements appear only after check-uncheck (input with xsi:type="xsd:boolean" problem)
Attached patch patch (obsolete) — Splinter Review
Problem is that __proto__ doesn't make acceptable object. toString() returns [xpconnect wrapped native prototype].
But after any acces to this object toString() returns something like this [object
HTMLInputElement @ 0x4e19c00 (native @ 0x60d1438)].
I've looked at #xformswidget-input-boolean.getControlElement in input-xhtml.xml and rewrite code without __proto__. Also I found superfluous method (because xformswidget-case-base extends xformswidget-general that contains same method) in xforms.xml and remove it.
Attachment #421982 - Flags: review?(surkov.alexander)
the same like bug 417051 (see bug 417051 comment #9). Sergey, could you please fix the bug the way used in bug 417051 and please fix other occurrences of __proto__ usage in getControlElement() method. So we won't waste the time for debugging of similar problems.
Assignee: nobody → sergeyreym
Status: NEW → ASSIGNED
Attached patch patch2 (obsolete) — Splinter Review
Patch similar to patch for bug 528686
Attachment #421982 - Attachment is obsolete: true
Attachment #422061 - Flags: review?(surkov.alexander)
Attachment #421982 - Flags: review?(surkov.alexander)
Attached patch patch3 (obsolete) — Splinter Review
Attachment #422061 - Attachment is obsolete: true
Attachment #422064 - Flags: review?(surkov.alexander)
Attachment #422061 - Flags: review?(surkov.alexander)
Comment on attachment 422064 [details] [diff] [review]
patch3

Please check what methods are required from control object by parent binding. For example, input bindings needs 'focus' method as well. Also please ensure all changed elements work correct after your patch. It would be nice to have attached testcase.
Attachment #422064 - Flags: review?(surkov.alexander) → review-
Attached patch patch4Splinter Review
Update patch only for #xformswidget-input-boolean.
Another __proto__ usages put into bug 540284.
Attachment #422064 - Attachment is obsolete: true
Attachment #422084 - Flags: review?(surkov.alexander)
Could you possibly rename "element" to "control"? element seems a bit too generic.
Comment on attachment 422084 [details] [diff] [review]
patch4

r=me
Attachment #422084 - Flags: review?(surkov.alexander)
Attachment #422084 - Flags: review?(aaronr)
Attachment #422084 - Flags: review+
(In reply to comment #8)
> Could you possibly rename "element" to "control"? element seems a bit too
> generic.

element is possibly fine because this member can point to not control elements like span and etc.
Attachment #422084 - Flags: review?(aaronr) → review+
checked in - http://hg.mozilla.org/xforms/rev/576e24224968
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
OS: Windows Vista → All
Hardware: x86_64 → All
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: