Topic: Select text inside of div on first click
Greetings all.
I'm having a problem with IE and DIV tags that have an inline style tag on them where the width is specified within the style tag. When a user tries to select any content within the DIV tag, the DIV is selected first and the content is editable on the second click. If the DIV tag does not have an inline style tag on it that specifies a width attribute, the text is given focus immediately. The behavior our users expect when clicking on the content within the DIV is that they will be able to edit the content immediately without having to double-click on it. Firefox users do not need to double-click to edit the content though, so I'm not sure what the intended behavior actually is.
After I realized that it seemed to happen with both the advanced and simple skins, I tried digging around in tinymce_mce_src.js. I was initially trying to trace back events that toggled the visual aid class to figure out how to immediately toggle the text selection, but I couldn't find anything that really helped me.
I've removed all of my plugins and just used the most basic advanced skin init function, but TinyMCE still did not set the focus to the text on the first click. Also, I'd like to point out that I experience the same behavior on the TinyMCE example page (http://tinymce.moxiecode.com/example_fu ample=true) using my test HTML. Following is some example code that seems to reproduce the behavior under the circumstances I described.
<div style="width: 200px;">
<br>
<br>
<br>
<br>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas pretium neque eu sapien. Aliquam erat volutpat. Cras eros nibh, viverra quis, gravida sit amet, varius nec, lorem. In porta. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer facilisis purus a enim.
<br>
<br>
<br>
<br>
</div>A solution that would prevent all DIV edits would be quite acceptable, as our users only need the most basic of editing capabilities. Any ideas?