1

Topic: Odd cursor behavior in 4.4.1

Hi, I implemented TinyMCE into my Microsoft Lightswitch project.

After initialization, the cursor acts very odd.
1. after first key press, cursor moves to first position after the initial text is added. Result from typing 'Hello World' renders as 'ello WorldH' in editor
2. in a new line after 'bullet' control is clicked and first key press, the cursor jumps to before the bullet point and adds a new line (I think after the bullet control is clicked, the cursor moves to the end of the prior line).
3. after typing in first bullet, on 'enter' keypress, the cursor moves to the first character position in the bullet list.

Basically it seems the cursor position is losing the last position after the 'enter' keypress or a control event. This is the most common thing I can figure out.

The site runs jquery-1.9.x; jquery-mobile-1.3.x
Same code was used in fiddle without the effects, so it cannot be reproduced in fiddle.

Please help

here is the initialization:
            $(element).find("textarea").tinymce({
                //script_url: 'Scripts/tinymce/tinymce.min.js',
                script_url: 'Scripts/tinymce/tinymce.js',
                //script_url: 'Scripts/tinymce/jquery.tinymce.min.js',
                //content_css: 'Scripts/tinymce/skins/charcoal/img/singleSpace.css',
                content_style: "p {margin: 0; padding: 0; border: 0;}",
                theme: 'modern',
                plugins: [
                            "advlist autolink lists link image charmap print preview anchor",
                            "searchreplace visualblocks code fullscreen",
                            "insertdatetime media table contextmenu paste"
                ],
                //toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
                //fix_list_elements : true,
                //forced_root_block: false,
                elementpath: false,
                menubar: false,
                //cleanup: true,
                browser_spellcheck: true,
                skin: 'charcoal',
                //plugins: [
                //          'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
                //          'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime nonbreaking', //media
                //          'save table contextmenu directionality emoticons template paste textcolor wordcount'
                //],
                toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview fullpage | forecolor backcolor emoticons',
                force_p_newlines: false,
                force_br_newlines: true,
                setup: function (editor) {
                    editor.on('change', function () {
                        //The below sets the value to the textarea container.
                        contentItem.value = tinyMCE.activeEditor.getContent();
                    });
                }
            });

Similar post for v3 with no resolution: http://archive.tinymce.com/forum/viewtopic.php?id=21340

2

Re: Odd cursor behavior in 4.4.1

No love?