I am working on a project that needs to run some processes when the editor area scroll bar is moved.
Currently I am creating the functions for the onscroll event after the editor has loaded via the FCKeditor_OnComplete function.
I cannot figure out how to capture or set the onscroll event for the editor area in firefox.
There appears to be no built-in function for FCK that deals with the onscroll event
For IE this works:
document.documentElement.onscroll = function()
Document being the editor area document.
In a simple test setup with an iframe in an iframe (similar to how the FCKEditor is setup) firefox will work doing this:
contentWindow.onscroll = function()
Where contentWindow is frame window for the editor area.
This method in the FCKEditor it does not work on firefox. There are no js errors or feedback of any kind from the browser.
I have tried to attach an event in various ways but no luck. Anyone else had luck with this?
Currently I am creating the functions for the onscroll event after the editor has loaded via the FCKeditor_OnComplete function.
I cannot figure out how to capture or set the onscroll event for the editor area in firefox.
There appears to be no built-in function for FCK that deals with the onscroll event
For IE this works:
document.documentElement.onscroll = function()
Document being the editor area document.
In a simple test setup with an iframe in an iframe (similar to how the FCKEditor is setup) firefox will work doing this:
contentWindow.onscroll = function()
Where contentWindow is frame window for the editor area.
This method in the FCKEditor it does not work on firefox. There are no js errors or feedback of any kind from the browser.
I have tried to attach an event in various ways but no luck. Anyone else had luck with this?
RE: Editor area onscroll event
In the FCKeditor_OnComplete function get the eEditorArea contentWindow and place this listener on it:
frameWindow.addEventListener("scroll", YOUR_FUNCTION, false);
I had tried this before in another spot and had not luck with it. It works here. I have no clue why all the other methods fail in the FCKEditor when they work in very similar test files.
Hope that helps someone.