Metadata
- Source
- FLUID-5580
- Type
- Bug
- Priority
- Major
- Status
- Open
- Resolution
- N/A
- Assignee
- Antranig Basman
- Reporter
- Justin Obara
- Created
2014-12-09T17:04:19.906-0500 - Updated
2021-08-08T13:47:04.745-0400 - Versions
- N/A
- Fixed Versions
-
- 5.0
- Component
-
- Renderer
Description
If a form element is passed through the renderer, it's id attribute will be stripped off if the form has an action attribute. This is particularly troublesome for HTLM5 where form elements such as an input with type submit, can live outside of the form but reference it by pointing it's form attribute at the forms id.
see: http://www.w3.org/TR/html-markup/button.submit.html
An example of the id being stripped can be seen in this fiddle
http://jsfiddle.net/0e136tzL/1/
Comments
-
Antranig Basman commented
2014-12-09T17:09:03.349-0500 There are really two issues in one here - firstly, the fact that the parser forces scr=rewrite-url onto the rsf:id attribute of the template on parsing (via https://github.com/fluid-project/infusion/blob/master/src/framework/renderer/js/fluidParser.js#L239 ) ends up confusing the renderer when it comes to find that the pairing UILink component is a fake, and it strips the id off. However, the renderer does expect to have full control over ids and URLs in the resulting document - so the real bug is that the renderer is not aware of the new HTML5 relations, for example "form" which is documented here - http://www.w3.org/TR/html5/forms.html#the-input-element
What should have happened is that dummy components were generated by the user (or still better, generated automatically by the template parser) and their ID relation was properly rewritten by the renderer.
This will still be an issue in the "new renderer" since it will use largely the same template parsing and rendering code - only the driver will be different (eliminating the JSON "renderer component dialects")
We should take the opportunity to remove the silly "scr=" system whereby template metadata was shoe-horned into a synthesized rsf:id attribute - since noone uses rsf:ids any more and we can afford to maintain some more sensible metadata structures. The renderer will need to synthesize more genuine forms of component in this case - where the component tree author has provided none and expects none, and just wants their id relation to be maintained
-
Antranig Basman commented
2021-08-08T13:47:04.745-0400 Probably not an issue for the new renderer but I'm keeping this open since the use case or something similar may reemerge. In practice this kind of "Web 1.0" form is pretty uncommon these days.