Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309170

Change subject: Add class to IPA container, do not use inline style
......................................................................

Add class to IPA container, do not use inline style

This is error prone and there are certain articles where this
will display incorrectly. Using a class allows consumers of the
API to handle this edge case as they wish.

Bug: T141835
Change-Id: Ica509ac9d2b643be044f4b0be3181a9bc7bc911d
---
M lib/transformations/hideIPA.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/70/309170/1

diff --git a/lib/transformations/hideIPA.js b/lib/transformations/hideIPA.js
index c45dc05..b6d6e96 100644
--- a/lib/transformations/hideIPA.js
+++ b/lib/transformations/hideIPA.js
@@ -41,8 +41,9 @@
         containerSpan.appendChild(buttonDiv);
         containerSpan.appendChild(parentSpan);
 
-        //set initial visibility
-        parentSpan.style.display = 'none';
+        //markup parent with class so that it can be hidden if required
+        var parentSpanClass = parentSpan.className;
+        parentSpan.className = parentSpanClass ? parentSpanClass + ' mcs-ipa' 
: 'mcs-ipa';
     }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica509ac9d2b643be044f4b0be3181a9bc7bc911d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to