JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / plugins / forms / dialogs / button.js
index 86cb4d7..fc49f70 100644 (file)
@@ -12,10 +12,10 @@ CKEDITOR.dialog.add( 'button', function( editor )
                {\r
                        delete this.button;\r
                        var element = this.getParentEditor().getSelection().getSelectedElement();\r
-                       if ( element && element.getName() == "input" )\r
+                       if ( element && element.is( 'input' ) )\r
                        {\r
                                var type = element.getAttribute( 'type' );\r
-                               if ( type == "button" || type == "reset" || type == "submit" )\r
+                               if ( type in { button:1, reset:1, submit:1 } )\r
                                {\r
                                        this.button = element;\r
                                        this.setupContent( element );\r