From 4d9a9f3776a7b8589367ba5f8dda7b62b2a410e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 30 Apr 2019 02:10:16 +0200 Subject: [PATCH] HTMLFormFieldWithButton: Don't pass empty string as 'id' The button must have an ID to be able to be infused. If the given ID is null, that's fine, OOUI will generate one. But passing an empty string apparently disables that. Bug: T222013 Change-Id: I96e1f838385c5539ed246d2ee7107cd037a5f338 --- includes/htmlform/fields/HTMLFormFieldWithButton.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/htmlform/fields/HTMLFormFieldWithButton.php b/includes/htmlform/fields/HTMLFormFieldWithButton.php index 93f5363d7b..be8f7d886c 100644 --- a/includes/htmlform/fields/HTMLFormFieldWithButton.php +++ b/includes/htmlform/fields/HTMLFormFieldWithButton.php @@ -59,7 +59,7 @@ class HTMLFormFieldWithButton extends HTMLFormField { 'type' => $this->mButtonType, 'label' => $this->mButtonValue, 'flags' => $this->mButtonFlags, - 'id' => $this->mButtonId, + 'id' => $this->mButtonId ?: null, ] + OOUI\Element::configFromHtmlAttributes( $this->getAttributes( [ 'disabled', 'tabindex' ] ) ) ); -- 2.20.1