iceboxqs
08-03-2004, 11:55 PM
Howdy,
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
range.selectNode(targetNode);
//Get the selection in the window
sel = ifObj.cw.getSelection();
//Collapse to the start of the node;
sel.collapseToStart();
//Extend the selection range to our previously set offset value
sel.extend(targetNode,targetPoint);
//Now we collapse to that point
sel.collapseToEnd();
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.
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
range.selectNode(targetNode);
//Get the selection in the window
sel = ifObj.cw.getSelection();
//Collapse to the start of the node;
sel.collapseToStart();
//Extend the selection range to our previously set offset value
sel.extend(targetNode,targetPoint);
//Now we collapse to that point
sel.collapseToEnd();
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.