Opened 9 years ago

Last modified 9 years ago

#13372 confirmed Bug

CkEditor zoom plugin scroll

Reported by: sobrle Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

If you have CkEditor zoom plugin and you set zoom level above 100% scroll doesn't work as it should. I have zoom at body set to 1.1 and I go to the bottom of the document. Then I press enter a few times and cursor goes below visible area. Scroller is visible, but it doesn't scroll to the bottom. But then if I press one character, editor scrolls to the bottom.

To reproduce download attachment, run on web server and follow instructions on the page.

Tested on Win8/Chrome.

Attachments (2)

zoom.rar (848.8 KB) - added by sobrle 9 years ago.
Sample to reproduce bug
Chrome scroll.png (43.9 KB) - added by Jakub Ś 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by sobrle

Attachment: zoom.rar added

Sample to reproduce bug

comment:1 Changed 9 years ago by Jakub Ś

Status: newconfirmed

I will confirm this issue as I could not reproduce it in native contenteditable. Furthermore this plugin only assigns styles to the body so it looks like there is something in editor (especially that I could not get same effect with native iframe )

<div id="testdiv" style=""></div>
<script type="text/javascript">
function createIframe() {
	var iframe = document.createElement( 'iframe' );
	iframe.setAttribute( 'width', '500px' );
	iframe.setAttribute( 'height', '200px' );
	iframe.setAttribute( 'id', 'testIframe' );	
	var html = '<!DOCTYPE html><html><title>Cursor Stays</title><head><meta charset="utf-8"></head><body id=\'innerBody\' contenteditable="true" ><p>ffff</p><p>ffff</p><p>ffff</p><p>ffff</p><p>ffff</p><p>ffff</p><p>ffff</p><p>ffff</p>'
		+'<script>'
			+'window.setTimeout(function(){'
				+'window.document.getElementById(\'innerBody\').style.cssText = \'-webkit-transform-origin: left top 0px; -webkit-transform: scale(1.5); zoom: 1.5;\';'
			+'}, 1200);'
		+'<\/script>'
	+'</body></html>';
	
	var myNav = navigator.userAgent.toLowerCase();
	var ieVer8_10 = ( myNav.indexOf( 'msie' ) != -1 ) ? parseInt( myNav.split( 'msie' )[1] ) : false;
	var isIE11 = !!navigator.userAgent.match( /Trident.*rv[ :]*11\./ )
	
	if( ( ieVer8_10 >= 8 && ieVer8_10 < 11 ) || isIE11 ) {
		document.getElementById( 'testdiv' ).appendChild( iframe );
		document.getElementById( 'testIframe' ).contentWindow.document.write( html );		
	} else {
		iframe.setAttribute( 'src', 'data:text/html;charset=utf-8,' + encodeURI( html ) );
		document.getElementById( 'testdiv' ).appendChild( iframe );
	}		
}
createIframe();	
</script>
Last edited 9 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 9 years ago by matejp

I noticed same thing. Any information when this bug could be resolved?

comment:3 Changed 9 years ago by Jakub Ś

#13808 was marked as duplicate.

That ticket contains TC with zoom plugin, scroll problem and our find plugin.

Changed 9 years ago by Jakub Ś

Attachment: Chrome scroll.png added
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy