public/ckeditor/4.4dev/core/selection.js
function hideSelection( editor ) {
		var style = CKEDITOR.env.ie ? 'display:none' : 'position:fixed;top:0;left:-1000px',
			hiddenEl = CKEDITOR.dom.element.createFromHtml(
				'<div data-cke-hidden-sel="1" data-cke-temp="1" style="' + style + '">&nbsp;</div>',
				editor.document );

		editor.fire( 'lockSnapshot' );

		editor.editable().append( hiddenEl );

			// Always use real selection to avoid overriding locked one (http://dev.ckeditor.com/ticket/11104#comment:13).
		var sel = editor.getSelection( 1 ),
			range = editor.createRange(),
			// Cancel selectionchange fired by selectRanges - prevent from firing selectionChange.
			listener = sel.root.on( 'selectionchange', function( evt ) {
				evt.cancel();
			}, null, null, 0 );

		range.setStartAt( hiddenEl, CKEDITOR.POSITION_AFTER_START );
		range.setEndAt( hiddenEl, CKEDITOR.POSITION_BEFORE_END );
		sel.selectRanges( [ range ] );

		listener.removeListener();

		editor.fire( 'unlockSnapshot' );

		// Set this value at the end, so reset() executed by selectRanges()
		// will clean up old hidden selection container.
		editor._.hiddenSelectionContainer = hiddenEl;
	}
function hideSelection( editor ) {
		var style = CKEDITOR.env.ie ? 'display:none' : 'position:fixed;top:0;left:-1000px',
			hiddenEl = CKEDITOR.dom.element.createFromHtml(
				'<div data-cke-hidden-sel="1" data-cke-temp="1" style="' + style + '">&nbsp;</div>',
				editor.document );

		editor.fire( 'lockSnapshot' );

		editor.editable().append( hiddenEl );

			// Always use real selection to avoid overriding locked one (http://dev.ckeditor.com/ticket/11104#comment:13).
		var sel = editor.getSelection( 1 ),
			range = editor.createRange(),
			// Cancel selectionchange fired by selectRanges - prevent from firing selectionChange.
			listener = sel.root.on( 'selectionchange', function( evt ) {
				evt.cancel();
			}, null, null, 0 );

		range.setStartAt( hiddenEl, CKEDITOR.POSITION_AFTER_START );
		range.setEndAt( hiddenEl, CKEDITOR.POSITION_BEFORE_END );
		sel.selectRanges( [ range ] );

		listener.removeListener();

		editor.fire( 'unlockSnapshot' );

		// Set this value at the end, so reset() executed by selectRanges()
		// will clean up old hidden selection container.
		editor._.hiddenSelectionContainer = hiddenEl;
	}
function hideSelection ( editor ) { var style = CKEDITOR . env . ie ? 'display:none' : 'position:fixed;top:0;left:-1000px' , hiddenEl = CKEDITOR . dom . element . createFromHtml ( '<div data-cke-hidden-sel="1" data-cke-temp="1" style="' + style + '">&nbsp;</div>' , editor . document ) ; editor . fire ( 'lockSnapshot' ) ; editor . editable ( ) . append ( hiddenEl ) ; // Always use real selection to avoid overriding locked one (http://dev.ckeditor.com/ticket/11104#comment:13). var sel = editor . getSelection ( 1 ) , range = editor . createRange ( ) , // Cancel selectionchange fired by selectRanges - prevent from firing selectionChange. listener = sel . root . on ( 'selectionchange' , function ( evt ) { evt . cancel ( ) ; } , null , null , 0 ) ; range . setStartAt ( hiddenEl , CKEDITOR . POSITION_AFTER_START ) ; range . setEndAt ( hiddenEl , CKEDITOR . POSITION_BEFORE_END ) ; sel . selectRanges ( [ range ] ) ; listener . removeListener ( ) ; editor . fire ( 'unlockSnapshot' ) ; // Set this value at the end, so reset() executed by selectRanges() // will clean up old hidden selection container. editor . _ . hiddenSelectionContainer = hiddenEl ; }
Creates cke_hidden_sel container and puts real selection there.
Creates cke_hidden_sel container and puts real selection there .