diff -u b/core/modules/contextual/js/contextual.js b/core/modules/contextual/js/contextual.js --- b/core/modules/contextual/js/contextual.js +++ b/core/modules/contextual/js/contextual.js @@ -54,14 +54,9 @@ // Ensure a trigger element exists before the actual contextual links. .prepend(Drupal.theme('contextualTrigger')); - // Attach Drupal behaviors to the newly added HTML content; this allows e.g. - // Drupal.behaviors.currentPathDestinationLink to work. Do so after the - // current executation cycle, to first allow all contextual links to be - // initialized. Those are visible; the destination query string is not, and - // will still be set in time. - window.setTimeout(function () { - Drupal.attachBehaviors($contextual.get(0)); - }, 0); + // Call Drupal.behaviors.currentPathDestinationLink.attach directly to + // set all destination parameters. + Drupal.behaviors.currentPathDestinationLink.attach($contextual.get(0)); // Create a model and the appropriate views. var model = new contextual.StateModel({