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
--- 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