Adding type="button" for button-Elements in IE9
authorAlexander Ebert <ebert@woltlab.com>
Fri, 14 Jun 2013 19:55:30 +0000 (21:55 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 14 Jun 2013 19:55:30 +0000 (21:55 +0200)
com.woltlab.wcf/templates/headInclude.tpl

index 3459bbed769bd8d216d1356f916f25573919dc39..490164017db2ca2a1b35d7185d82c04fac352b68 100644 (file)
        });
        //]]>
 </script>
+ <!--[IF IE 9]>
+ <script type="text/javascript">
+       $(function() {
+               function fixButtonTypeIE9() {
+                       $('button').each(function(index, button) {
+                               var $button = $(button);
+                               if (!$button.attr('type')) {
+                                       $button.attr('type', 'button');
+                               }
+                       });
+               }
+               
+               WCF.DOMNodeInsertedHandler.addCallback('WCF.FixButtonTypeIE9', fixButtonTypeIE9);
+               fixButtonTypeIE9();
+       });
+ </script>
+ <![ENDIF]-->
 
 {include file='imageViewer'}
\ No newline at end of file