1

Topic: Auto scroll/focus Problem

My tiny mce editor is located at the bottom part of the page. The problem is when the page loads, the browser automatically scrolls down and focus to the editor. Does anyone know how to remove the auto scrolling of the browser?

2

Re: Auto scroll/focus Problem

Shoot, nobody ever answered this and I'm having the same problem. I'm going to try to solve it by adding a dummy field at the top of the page and setting the focus there.

3

Re: Auto scroll/focus Problem

Hello,

Could you call window.scrollTo(0,0);

Kind Regards

Natalie

http://tinymce.ephox.com/

4

Re: Auto scroll/focus Problem

I couldn't reproduce it on our example: http://tinymce.moxiecode.com/tryit/full.php tested on IE 6, IE 9 and FF 4.

Best regards,
Spocke - Main developer of TinyMCE

5

Re: Auto scroll/focus Problem

You probably couldn't reproduce it on your example because the example page has an instance of TinyMCE that loads when the page loads.  I can reproduce this when I dynamically add an instance of TinyMCE on a button click for example.  It's hard to say exactly where the page is scrolling but it looks like it is either scrolling to the bottom of the page or scrolls so that the top of the editor is at the top of the page.  I can only reproduce this in Chrome.

6

Re: Auto scroll/focus Problem

I have the same problem.

When i create many tinymce on ajax content load, the window scroll down to the last tinymce content load.

i tried :

setup : function(ed) {
      ed.onLoadContent.add(function(ed, o) {
    var controlLoad = setTimeout(function() {
      $(document).scrollTop(0);
        clearTimeout(controlLoad);
    }, 100);
  });
   },

but it's work only if timeout is over 700ms.
I have 4 tinymce instance on the content ajax loaded and the window scroll up and down 4 times.
Else the windows stay on last instance load.

My script

function loadpage(){
var dest = $('#pages');
dest.html('Loading...');
$.get('test.html', function(data) {
dest.empty();
dest.append(data.content);   
docready(dest);
});
}

function docready(dest){
[...]
dest.find('.tiny-editor').tinymce(tinymce_options)
}

I try with advanced, simple, external toolbar,set focus on input field... autofocus bug.

With focus field, the focus is in the field, bug the page is scroll down on tinymce.

I use jquery.tinymce.js and tinymce majorVersion:"3",minorVersion:"5.7",releaseDate:"2012-09-20"

Thank for help and sorry for my poor english ^^


Edit :
If the anchor is : # -> the bug is active
If the anchor of url is anything else, the bug is inactive

Last edited by f6xara (2012-10-25 19:51:40)

7

Re: Auto scroll/focus Problem

I'm seeing the same problem. Was this documented or fixed?
I'm using version 4.0.10
The issue still exists in 4.0.18 tinymce.com/tryit/basic.php#

Last edited by esteedmad (2014-03-11 16:49:01)