EditPage: Restore IE 6 compatibility for OOUI-style buttons
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 18 Apr 2017 16:32:34 +0000 (18:32 +0200)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 18 Apr 2017 18:50:53 +0000 (11:50 -0700)
Follow-up to 97d7de0b84ef65094108fbcf62ffcc1c55d75345.

Bug: T163219
Change-Id: Ifb5145c631ce1a3aa7e51956fab3ec7da8b994d2

includes/EditPage.php

index f97f164..a9a5efa 100644 (file)
@@ -4308,6 +4308,8 @@ HTML
                if ( $this->oouiEnabled ) {
                        $saveConfig = OOUI\Element::configFromHtmlAttributes( $attribs );
                        $buttons['save'] = new OOUI\ButtonInputWidget( [
+                               // Support: IE 6 – Use <input>, otherwise it can't distinguish which button was clicked
+                               'useInputTag' => true,
                                'flags' => [ 'constructive', 'primary' ],
                                'label' => $this->context->msg( $buttonLabelKey )->text(),
                                'infusable' => true,
@@ -4329,6 +4331,8 @@ HTML
                if ( $this->oouiEnabled ) {
                        $previewConfig = OOUI\Element::configFromHtmlAttributes( $attribs );
                        $buttons['preview'] = new OOUI\ButtonInputWidget( [
+                               // Support: IE 6 – Use <input>, otherwise it can't distinguish which button was clicked
+                               'useInputTag' => true,
                                'label' => $this->context->msg( 'showpreview' )->text(),
                                'infusable' => true,
                                'type' => 'submit'
@@ -4347,6 +4351,8 @@ HTML
                if ( $this->oouiEnabled ) {
                        $diffConfig = OOUI\Element::configFromHtmlAttributes( $attribs );
                        $buttons['diff'] = new OOUI\ButtonInputWidget( [
+                               // Support: IE 6 – Use <input>, otherwise it can't distinguish which button was clicked
+                               'useInputTag' => true,
                                'label' => $this->context->msg( 'showdiff' )->text(),
                                'infusable' => true,
                                'type' => 'submit',