Bug 1294038 - force selections to be read after webconsole completion;r=nchevobbe
MozReview-Commit-ID: 977wLMj3cSa
--- a/devtools/client/webconsole/jsterm.js
+++ b/devtools/client/webconsole/jsterm.js
@@ -1632,16 +1632,22 @@ JSTerm.prototype = {
* Clear the current completion information and close the autocomplete popup,
* if needed.
*/
clearCompletion: function () {
this.autocompletePopup.clearItems();
this.lastCompletion = { value: null };
this.updateCompleteNode("");
if (this.autocompletePopup.isOpen) {
+ // Trigger a blur/focus of the JSTerm input to force screen readers to read the
+ // value again.
+ this.inputNode.blur();
+ this.autocompletePopup.once("popup-closed", () => {
+ this.inputNode.focus();
+ });
this.autocompletePopup.hidePopup();
this._autocompletePopupNavigated = false;
}
},
/**
* Accept the proposed input completion.
*