JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4
[ckeditor.git] / _source / plugins / table / dialogs / table.js
index 55a45e1..7b06606 100644 (file)
@@ -32,8 +32,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                        onLoad : function()\r
                        {\r
-                               var dialog = this,\r
-                                       isUpdating;\r
+                               var dialog = this;\r
 \r
                                var styles = dialog.getContentElement( 'advanced', 'advStyles' );\r
 \r
@@ -41,12 +40,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                {\r
                                        styles.on( 'change', function( evt )\r
                                                {\r
-                                                       if ( isUpdating )\r
-                                                               return;\r
-\r
-                                                       // Flag to avoid recursion.\r
-                                                       isUpdating = 1;\r
-\r
                                                        // Synchronize width value.\r
                                                        var width = this.getStyle( 'width', '' ),\r
                                                                txtWidth = dialog.getContentElement( 'info', 'txtWidth' ),\r
@@ -59,17 +52,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                width = parseInt( width, 10 );\r
                                                        }\r
 \r
-                                                       txtWidth && txtWidth.setValue( width );\r
-                                                       cmbWidthType && cmbWidthType.setValue( isPx ? 'pixels' : 'percents' );\r
+                                                       txtWidth && txtWidth.setValue( width, true );\r
+                                                       cmbWidthType && cmbWidthType.setValue( isPx ? 'pixels' : 'percents', true );\r
 \r
                                                        // Synchronize height value.\r
                                                        var height = this.getStyle( 'height', '' ),\r
                                                                txtHeight = dialog.getContentElement( 'info', 'txtHeight' );\r
 \r
                                                        height && ( height = parseInt( height, 10 ) );\r
-                                                       txtHeight && txtHeight.setValue( height );\r
-\r
-                                                       isUpdating = 0;\r
+                                                       txtHeight && txtHeight.setValue( height, true );\r
                                                });\r
                                }\r
                        },\r
@@ -108,19 +99,17 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        this._.selectedElement = selectedTable;\r
                                }\r
 \r
-                               // Enable, disable and select the row, cols, width fields.\r
+                               // Enable or disable the row, cols, width fields.\r
                                if ( selectedTable )\r
                                {\r
                                        this.setupContent( selectedTable );\r
                                        rowsInput && rowsInput.disable();\r
                                        colsInput && colsInput.disable();\r
-                                       widthInput && widthInput.select();\r
                                }\r
                                else\r
                                {\r
                                        rowsInput && rowsInput.enable();\r
                                        colsInput && colsInput.enable();\r
-                                       rowsInput && rowsInput.select();\r
                                }\r
 \r
                                // Call the onChange method for the widht and height fields so\r