After some more debugging, it seems that the RTE it seems that the series of events on the
- YUI RTE fires nodeChanged on page load
- ORBEON.widgets.RTE.changeEvent gets called, this forces focus to the RTE. So when the page is loaded, Orbeon believes that the RTE has focus (this is probably problem in of itself).
- when the user focuses on *any* field, ORBEON.widgets.RTE.focusOnAnyFormControl is called, resulting in a change event for the RTE being fired.
I think if the focus-on-load issue was fixed, at least this problem might be restricted to the case when the user focuses on the RTE itself, rather than anywhere on the page.
Adrian Baker wrote
When running
html-area.xhtml, if you click on the input field at the top of the page, the HTML inside the RTE below is reformatted, resulting in an xforms-value-changed event.
The particular HTML which triggers this is the <em> tag - the way the RTE is being used means that YUI will alternately produce both <em> and <i> tags. However other more complex markup also seems to trigger the issue.