jenkins-bot has submitted this change and it was merged.
Change subject: Revert 370b375: don't use this.$.context in getElementDocument()
......................................................................
Revert 370b375: don't use this.$.context in getElementDocument()
Or any other cached value for that matter.
Reverts code change only, does not revert addition of tests.
Change-Id: I9fe6ccf7c77dfdaf2233f1ad296519330efeb090
---
M src/Element.js
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Trevor Parscal: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/Element.js b/src/Element.js
index fe23221..b26e446 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -514,7 +514,9 @@
* @return {HTMLDocument} Document object
*/
OO.ui.Element.prototype.getElementDocument = function () {
- return this.$.context;
+ // Don't use this.$.context because subclasses can rebind this.$
+ // Don't cache this in other ways either because subclasses could can
change this.$element
+ return OO.ui.Element.static.getDocument( this.$element );
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/179346
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9fe6ccf7c77dfdaf2233f1ad296519330efeb090
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope <[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