Page MenuHomePhabricator

getEnabledState called twice on initialization
Closed, ResolvedPublic

Description

The global mw.popups.enabled is set first by the desktop target.

desktopTarget.js#L64
mw.popups.enabled = mw.popups.getEnabledState();

Then re-called by schema code:

ext.popups.schemaPopups.utils.js#L14
	popupEnabled: mw.popups.getEnabledState(),

Schema code should base popups enabled by using the global variable mw.popups.enabled or memoize mw.popups.getEnabledState.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 20 2016, 9:51 AM
bmansurov triaged this task as Normal priority.Oct 26 2016, 8:25 PM
bmansurov edited projects, added Technical-Debt (RW-Tech-Debt); removed Technical-Debt.
bmansurov moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.
Jdlrobson closed this task as Resolved.Feb 14 2017, 9:41 PM
Jdlrobson claimed this task.
Jdlrobson added a subscriber: Jdlrobson.

popups.isEnabled is now called once in src/index.js
#rewrite