Bug 1277906 - part1: change HTMLTooltip default autofocus value to false;r=bgrins
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 03 Jun 2016 21:15:54 +0200
changeset 341402 a770e8c521f7d60fcb6e8d14555b7de282ad1e1e
parent 341401 67c37ed1a25f92cac6294cb70af97e95515c30e2
child 341403 c2778bbb1938f995a1e3941c0f3c28c6872893f4
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1277906
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1277906 - part1: change HTMLTooltip default autofocus value to false;r=bgrins Given the current usage of the HTMLTooltip, I think having the autofocus as an opt-in behavior makes more sense. MozReview-Commit-ID: CS98szSKQdF
devtools/client/shared/widgets/HTMLTooltip.js
--- a/devtools/client/shared/widgets/HTMLTooltip.js
+++ b/devtools/client/shared/widgets/HTMLTooltip.js
@@ -49,23 +49,23 @@ const EXTRA_BORDER = {
  * The HTMLTooltip can display HTML content in a tooltip popup.
  *
  * @param {Toolbox} toolbox
  *        The devtools toolbox, needed to get the devtools main window.
  * @param {Object}
  *        - {String} type
  *          Display type of the tooltip. Possible values: "normal", "arrow"
  *        - {Boolean} autofocus
- *          Defaults to true. Should the tooltip be focused when opening it.
+ *          Defaults to false. Should the tooltip be focused when opening it.
  *        - {Boolean} consumeOutsideClicks
  *          Defaults to true. The tooltip is closed when clicking outside.
  *          Should this event be stopped and consumed or not.
  */
 function HTMLTooltip(toolbox,
-  {type = "normal", autofocus = true, consumeOutsideClicks = true} = {}) {
+  {type = "normal", autofocus = false, consumeOutsideClicks = true} = {}) {
   EventEmitter.decorate(this);
 
   this.doc = toolbox.doc;
   this.type = type;
   this.autofocus = autofocus;
   this.consumeOutsideClicks = consumeOutsideClicks;
 
   // Use the topmost window to listen for click events to close the tooltip