jedivind / ubiquity-xforms

Automatically exported from code.google.com/p/ubiquity-xforms
1 stars 0 forks source link

model doesn't work when placed in head #601

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
model elements placed in XHTML's head are ignored by Ubiquity XForms. Only
those inside body work. This bug is annoying, although it's usually easy to
apply the described workaround. However, head is the preferable ancestor
for model.

Original issue reported on code.google.com by 198...@gmail.com on 28 Oct 2009 at 12:16

GoogleCodeExporter commented 8 years ago
This is due to a limitation in Firefox, whereby XBL is not attached to elements 
in the head of a document. 
(Actually, more precisely, it's CSS is not applied, which is how the XBL gets 
attached.)

So the recommendation for ensuring that your forms work in all browsers is to 
place xf:model inside xf:body.

However, an interesting twist here is that since WebKit-based browsers don't 
support XBL (or HTC, the 
mechanism used in IE), then functionality is added by walking the DOM. This 
creates an interesting possibility 
that for Firefox we could use *both* the DOM-walking technique and the CSS/XBL 
technique, which would 
allow xf:model to be placed anywhere.

I'm approving the issue, changing it to an enhancement (since it's a workaround 
that we didn't have before), 
and adding the FF label.

Original comment by mark.bir...@gtempaccount.com on 28 Oct 2009 at 3:12