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

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
8 years ago
2 years ago

People

(Reporter: Sergey Reymerov, Assigned: Sergey Reymerov)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 3 obsolete attachments)

(Assignee)

Description

8 years ago
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.
(Assignee)

Updated

8 years ago
Summary: Tabs and other hidden elements appears only after second click. → Tabs and other hidden elements appear only after second click.
(Assignee)

Updated

8 years ago
Summary: Tabs and other hidden elements appear only after second click. → Tabs and other hidden elements appear only after check-uncheck (triggers problem)
(Assignee)

Comment 1

8 years ago
Created attachment 420047 [details]
testcase

Simple testcase for this problem. According to file in link.

Updated

8 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

8 years ago
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)

Updated

8 years ago
Blocks: 539184
(Assignee)

Comment 2

8 years ago
Created attachment 421982 [details] [diff] [review]
patch

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)

Comment 3

8 years ago
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
(Assignee)

Comment 4

8 years ago
Created attachment 422061 [details] [diff] [review]
patch2

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)
(Assignee)

Comment 5

8 years ago
Created attachment 422064 [details] [diff] [review]
patch3
Attachment #422061 - Attachment is obsolete: true
Attachment #422064 - Flags: review?(surkov.alexander)
Attachment #422061 - Flags: review?(surkov.alexander)

Comment 6

8 years ago
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-
(Assignee)

Comment 7

8 years ago
Created attachment 422084 [details] [diff] [review]
patch4

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 9

8 years ago
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+

Comment 10

8 years ago
(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.

Updated

8 years ago
Attachment #422084 - Flags: review?(aaronr) → review+

Comment 11

8 years ago
checked in - http://hg.mozilla.org/xforms/rev/576e24224968
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Updated

8 years ago
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.