jenkins-bot has submitted this change and it was merged.

Change subject: Turn FieldLayout into a <label/>
......................................................................


Turn FieldLayout into a <label/>

This will magically make clicking on labels work without JavaScript,
and hopefully has no bad side-effects. Hopefully.

Bug: 72587
Change-Id: I95eabef744d661d0f8036ca6a044f5b8bd913739
---
M php/layouts/OoUiFieldLayout.php
M src/layouts/FieldLayout.js
2 files changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Trevor Parscal: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/php/layouts/OoUiFieldLayout.php b/php/layouts/OoUiFieldLayout.php
index 594bf3e..99784ef 100644
--- a/php/layouts/OoUiFieldLayout.php
+++ b/php/layouts/OoUiFieldLayout.php
@@ -1,6 +1,11 @@
 <?php
 
 class OoUiFieldLayout extends OoUiLayout {
+
+       /* Static properties */
+
+       public static $tagName = 'label';
+
        /**
         * Alignment.
         *
diff --git a/src/layouts/FieldLayout.js b/src/layouts/FieldLayout.js
index d3b0122..4c0aeae 100644
--- a/src/layouts/FieldLayout.js
+++ b/src/layouts/FieldLayout.js
@@ -73,6 +73,10 @@
 OO.inheritClass( OO.ui.FieldLayout, OO.ui.Layout );
 OO.mixinClass( OO.ui.FieldLayout, OO.ui.LabelElement );
 
+/* Static Properties */
+
+OO.ui.FieldLayout.static.tagName = 'label';
+
 /* Methods */
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/169218
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I95eabef744d661d0f8036ca6a044f5b8bd913739
Gerrit-PatchSet: 4
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to