﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8169	Webkit editor doesn't scroll without focus.	Jakub Ś		"Issue found when reproducing #7635

1. Open replacebycode sample page
2. Paste the following code
{{{
var doScroll = function(collapseToStart) {
 var e = CKEDITOR.instances.editor1;
 var d = e.document;
 var r = new CKEDITOR.dom.range(d);
 r.selectNodeContents(d.getBody());
 r.collapse(collapseToStart);
 r.select();
 e.focus();
 e.getSelection().scrollIntoView();
};
var scrollToTop = function() { doScroll(true); };
var scrollToBottom = function() { doScroll(false); };
				
setTimeout(scrollToBottom, 2000);
setTimeout(scrollToTop, 3000);
setTimeout(scrollToBottom, 4000);
}}}
3. Open page in Webkit

**Result:** You will see that editor only scrolls down once when it has no focus. If it has focus it scrolls down-up-down.

Now add extra setTimeout function
{{{
setTimeout(scrollToTop, 1500);
setTimeout(scrollToBottom, 2000);
setTimeout(scrollToTop, 3000);
setTimeout(scrollToBottom, 4000);
}}}

If editor has no focus it scrolls down-up-down. If it has focus it scrolls up-down-up-down.

If there would be only one setTimeout function, you wouldn’t see any scrolling.

**Webkit uses first function call to gain focus.**
"	Bug	confirmed	Normal		General	3.0.2		Webkit	
