Page MenuHomePhabricator called twice
Closed, ResolvedPublic


This could be deliberate, but it looks silly: gets called twice during VE initialization. The if ( !wasSetup ) guard ensures that the CSS transition is only applied once, but it does not prevent the a duplicate toolbarSetupDeferred done handler from being registered.

Event Timeline

ori assigned this task to Krinkle.
ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori added a project: VisualEditor-Performance.
ori added a subscriber: ori.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is probably related to the dummy toolbar we have. Before the document is requested, parsed and converted, we create a dummy toolbar that is later replaced. I took care not to re-create a transition or promise, but instead register onto the existing promise if there is one.

rEVED703b2c2ed08e: Show the toolbar as soon as the target has been activated

It depends on how the state is handled, but perhaps we should somehow cancel the callback if the second one gets there before it runs. Or perhaps the dummy one doesn't/shouldn't have that additional code at all?

Jdforrester-WMF moved this task from To Triage to Bug Fixes on the VisualEditor board.
Jdforrester-WMF set Security to None.

Hmm, I may have accidentally fixed a part of this in and, or possibly broken something if this was actually intentional. I saw no problematic behavior with these patches, though.