JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2
[ckeditor.git] / _source / plugins / find / dialogs / find.js
index ead43bf..70a082c 100644 (file)
@@ -816,10 +816,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                // Establish initial searching start position.\r
                                finder.searchRange = getSearchRange();\r
 \r
-                               if ( startupPage == 'replace' )\r
-                                       this.getContentElement( 'replace', 'txtFindReplace' ).focus();\r
-                               else\r
-                                       this.getContentElement( 'find', 'txtFindFind' ).focus();\r
+                               this.selectPage( startupPage );\r
                        },\r
                        onHide : function()\r
                        {\r
@@ -833,6 +830,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                // Clear current session before dialog close\r
                                delete finder.matchRange;\r
+                       },\r
+                       onFocus : function()\r
+                       {\r
+                               if ( startupPage == 'replace' )\r
+                                       return this.getContentElement( 'replace', 'txtFindReplace' );\r
+                               else\r
+                                       return this.getContentElement( 'find', 'txtFindFind' );\r
                        }\r
                };\r
        };\r