View Full Version : Mac Mozilla loses cursor in editable doc

08-03-2004, 11:55 PM

I am taking the body.innerHTML of an iframe, doing some formatting to it and then tossing it back into iframe body.innerHTML.

I then use this code to get the cursor back to where it use to be:

//Setup selection range
range = document.createRange();

//Select the target node

//Get the selection in the window
sel = ifObj.cw.getSelection();

//Collapse to the start of the node;

//Extend the selection range to our previously set offset value

//Now we collapse to that point

This works great, execpt for one small issue. If you are using mozilla on a mac the cursor doesn't show up visually to the user. It is there, you can start editing and stuff fine, but the cursor isn't displayed.

The cursor only seem to display if you click on the iframe with the mouse.

Has anyone ran into this problem?

On the pc using mozilla the cursor stays visible.

08-04-2004, 01:27 AM
Well here is how I get around for now.

On the mac running mozilla you have to lose focus on the iframe window and then reapply focus to it.

However if you just use blur() any other windows that are open flash just before focus() is called. So I made a hidden input field that I give focus to and then I give my iframe window focus again. That makes the cursor show up where I had placed with the code mentioned above.

The more I work with mozillas built in editor the more I think it is really really broken. :(