[TYPO3-rte] RTE focus

Stanislas Rolland typo3 at sjbr.ca
Mon Feb 28 16:11:48 CET 2011


Hi Rudy,
>> In HTMLArea.Editor.prototype._createRange (htmlarea-ie.js).
>
> Thanks for your answer. However, if I remove the focus there I get JS
> errors in IE.
>
> Am I correct in assuming IE needs focus on the RTE to properly
> initialize it? This would mean this can't be solved by not giving focus
> to the RTE.
>
This is indeed a difficult issue. When the selection is collapsed 
(nothing is higligthed, the cursor is just somewhere in content) and the 
RTE does not have focus, IE does not consider the selection object of 
this document to be valid (I think this is a bug in IE). This means that 
the RTE must have focus in order to update the toolbar. It is also 
needed when undo/redo snapshots are taken from time to time so that 
cursor position may be restored on undo/redo.

It seems however that it is not always the case that IE scrolls to the 
RTE that gets focus... I do not know when it does or does not.

> Is there any way to see when an RTE is completely done loading?
> HTMLArea.isReady, HTMLArea.Iframe.ready, HTMLArea.Framework.ready and
> HTMLArea.Editor.ready are already set to true before the focus is set to
> the RTE in IE for the last time during initialization.
>
When everything is complete, toolbar update is triggered. When toolbar 
completes is not known because every toolbar object is triggered to 
update its state.

Regards,
Stanislas



More information about the TYPO3-project-rte mailing list