Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / contextual / js / views / KeyboardView.es6.js
index 908b249593175ef486f472e8f4d6cd27591d1988..4c13f08e31c8bab5702ac4025a07fd03f0b22cbe 100644 (file)
@@ -3,56 +3,56 @@
  * A Backbone View that provides keyboard interaction for a contextual link.
  */
 
-(function (Drupal, Backbone) {
-  Drupal.contextual.KeyboardView = Backbone.View.extend(/** @lends Drupal.contextual.KeyboardView# */{
-
-    /**
-     * @type {object}
-     */
-    events: {
-      'focus .trigger': 'focus',
-      'focus .contextual-links a': 'focus',
-      'blur .trigger': function () {
-        this.model.blur();
-      },
-      'blur .contextual-links a': function () {
-        // Set up a timeout to allow a user to tab between the trigger and the
-        // contextual links without the menu dismissing.
-        const that = this;
-        this.timer = window.setTimeout(() => {
-          that.model.close().blur();
-        }, 150);
+(function(Drupal, Backbone) {
+  Drupal.contextual.KeyboardView = Backbone.View.extend(
+    /** @lends Drupal.contextual.KeyboardView# */ {
+      /**
+       * @type {object}
+       */
+      events: {
+        'focus .trigger': 'focus',
+        'focus .contextual-links a': 'focus',
+        'blur .trigger': function() {
+          this.model.blur();
+        },
+        'blur .contextual-links a': function() {
+          // Set up a timeout to allow a user to tab between the trigger and the
+          // contextual links without the menu dismissing.
+          const that = this;
+          this.timer = window.setTimeout(() => {
+            that.model.close().blur();
+          }, 150);
+        },
       },
-    },
 
-    /**
-     * Provides keyboard interaction for a contextual link.
-     *
-     * @constructs
-     *
-     * @augments Backbone.View
-     */
-    initialize() {
       /**
-       * The timer is used to create a delay before dismissing the contextual
-       * links on blur. This is only necessary when keyboard users tab into
-       * contextual links without edit mode (i.e. without TabbingManager).
-       * That means that if we decide to disable tabbing of contextual links
-       * without edit mode, all this timer logic can go away.
+       * Provides keyboard interaction for a contextual link.
+       *
+       * @constructs
        *
-       * @type {NaN|number}
+       * @augments Backbone.View
        */
-      this.timer = NaN;
-    },
+      initialize() {
+        /**
+         * The timer is used to create a delay before dismissing the contextual
+         * links on blur. This is only necessary when keyboard users tab into
+         * contextual links without edit mode (i.e. without TabbingManager).
+         * That means that if we decide to disable tabbing of contextual links
+         * without edit mode, all this timer logic can go away.
+         *
+         * @type {NaN|number}
+         */
+        this.timer = NaN;
+      },
 
-    /**
-     * Sets focus on the model; Clears the timer that dismisses the links.
-     */
-    focus() {
-      // Clear the timeout that might have been set by blurring a link.
-      window.clearTimeout(this.timer);
-      this.model.focus();
+      /**
+       * Sets focus on the model; Clears the timer that dismisses the links.
+       */
+      focus() {
+        // Clear the timeout that might have been set by blurring a link.
+        window.clearTimeout(this.timer);
+        this.model.focus();
+      },
     },
-
-  });
-}(Drupal, Backbone));
+  );
+})(Drupal, Backbone);