bug: typing in YUI RTE in IE resets scroll position

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug: typing in YUI RTE in IE resets scroll position

Adrian Baker-3
In IE6/7, if you type text continuously into the bottom of a YUI rich text area with content long enough to scroll, and incremental is set to true, the scroll position flicks intermittently back to the top of the text area.

This makes the textarea very difficult to use...

Example showing the problem attached (html-area.xhtml), have reproduced it against yesterdays nightly.

Works ok in Firefox, and in IE if incremental is not set. Something about the updates from the server is confusing the RTE I guess.

Reply | Threaded
Open this post in threaded view
|

Re: bug: typing in YUI RTE in IE resets scroll position

Adrian Baker-3
Looks like I've found the culprit, some leftover FCK code in xforms.js:

        // After we update classes on textarea, copy those classes on the FCKeditor iframe
        if (ORBEON.util.Dom.hasClass(documentElement, "xforms-textarea")
                        && ORBEON.util.Dom.hasClass(documentElement, "xforms-mediatype-text-html")) {
                ORBEON.xforms.Controls.updateHTMLAreaClasses(documentElement);
        }

If I remove this, things work correctly. So this step needs to be wrapped in a check for YUI/FCK.

Adrian Baker wrote
In IE6/7, if you type text continuously into the bottom of a YUI rich text area with content long enough to scroll, and incremental is set to true, the scroll position flicks intermittently back to the top of the text area.

This makes the textarea very difficult to use...

Example showing the problem attached (html-area.xhtml), have reproduced it against yesterdays nightly.

Works ok in Firefox, and in IE if incremental is not set. Something about the updates from the server is confusing the RTE I guess.
Reply | Threaded
Open this post in threaded view
|

Re: bug: typing in YUI RTE in IE resets scroll position

Adrian Baker-3
Did this get logged/fixed ?

Adrian Baker wrote
Looks like I've found the culprit, some leftover FCK code in xforms.js:

        // After we update classes on textarea, copy those classes on the FCKeditor iframe
        if (ORBEON.util.Dom.hasClass(documentElement, "xforms-textarea")
                        && ORBEON.util.Dom.hasClass(documentElement, "xforms-mediatype-text-html")) {
                ORBEON.xforms.Controls.updateHTMLAreaClasses(documentElement);
        }

If I remove this, things work correctly. So this step needs to be wrapped in a check for YUI/FCK.

Adrian Baker wrote
In IE6/7, if you type text continuously into the bottom of a YUI rich text area with content long enough to scroll, and incremental is set to true, the scroll position flicks intermittently back to the top of the text area.

This makes the textarea very difficult to use...

Example showing the problem attached (html-area.xhtml), have reproduced it against yesterdays nightly.

Works ok in Firefox, and in IE if incremental is not set. Something about the updates from the server is confusing the RTE I guess.
Reply | Threaded
Open this post in threaded view
|

Re: bug: typing in YUI RTE in IE resets scroll position

Alessandro Vernet
Administrator
Adrian,

Adrian Baker wrote
Did this get logged/fixed ?
I tried to reproduce this now, and couldn't see the problem. This is most likely because we have done other changes related to incremental text areas with mediatype="text/html". But I nevertheless added an additional test to only do this class updating if we are indeed using the FCK editor. (The code wasn't very safe, and was copying classes on the previous sibling elements, which I can imagine could cause other issues if the FCK editor isn't used.) I checked this in, and the change will be included in the next nightly build. Sorry again for the delay responding to this one!

Alex