X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fforms%2Fdialogs%2Fselect.js;h=228a05ee02e3fa11f9884bfb016b4e7aef7a81eb;hb=f8fc585c18d287eb325c575596d183122486b641;hp=645a1baa40a7ca8c84d9ed03ccf0331f046c320e;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/forms/dialogs/select.js b/_source/plugins/forms/dialogs/select.js index 645a1ba..228a05e 100644 --- a/_source/plugins/forms/dialogs/select.js +++ b/_source/plugins/forms/dialogs/select.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'select', function( editor ) @@ -73,7 +73,7 @@ CKEDITOR.dialog.add( 'select', function( editor ) function removeAllOptions( combo ) { combo = getSelect( combo ); - while( combo.getChild( 0 ) && combo.getChild( 0 ).remove() ) + while ( combo.getChild( 0 ) && combo.getChild( 0 ).remove() ) { /*jsl:pass*/ } } // Moves the selected option by a number of steps (also negative). @@ -160,7 +160,18 @@ CKEDITOR.dialog.add( 'select', function( editor ) this.commitContent( element ); if ( isInsertMode ) - editor.insertElement( element ); + { + editor.insertElement(element); + if ( CKEDITOR.env.ie ) + { + var sel = editor.getSelection(), + bms = sel.createBookmarks(); + setTimeout(function () + { + sel.selectBookmarks( bms ); + }, 0 ); + } + } }, contents : [ { @@ -247,6 +258,8 @@ CKEDITOR.dialog.add( 'select', function( editor ) { if ( name == 'select' ) this.setValue( element.getAttribute( 'size' ) || '' ); + if ( CKEDITOR.env.webkit ) + this.getInputElement().setStyle( 'width', '86px' ); }, commit : function( element ) { @@ -523,6 +536,8 @@ CKEDITOR.dialog.add( 'select', function( editor ) { if ( name == 'select' ) this.setValue( element.getAttribute( 'multiple' ) ); + if ( CKEDITOR.env.webkit ) + this.getElement().getParent().setStyle( 'vertical-align', 'middle' ); }, commit : function( element ) {