Open
Bug 846361
Opened 12 years ago
Updated 3 years ago
Console autocomplete popup flickers in and out as I type
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(Not tracked)
NEW
People
(Reporter: jorendorff, Unassigned)
Details
(Whiteboard: [autocomplete])
Steps:
1. Open the Web Console
2. Type: "var a = 1, b = a + 1;"
Desired: No autocomplete popup appears as long as I'm typing.
Observed: Autocomplete popup appears and immediately disappears every time I type something that looks like a word.
---
I noticed this because I wanted to use the console to demo a new JS language feature at a local developer event, and the popup was kind of embarrassing. I ended up hiding it using the gruesome hack below (which obviously is no solution, but a CSS transition-delay hack might do the trick):
diff --git a/browser/devtools/webconsole/AutocompletePopup.jsm b/browser/devtools/webconsole/AutocompletePopup.jsm
--- a/browser/devtools/webconsole/AutocompletePopup.jsm
+++ b/browser/devtools/webconsole/AutocompletePopup.jsm
@@ -58,16 +58,17 @@ this.AutocompletePopup = function Autoco
// Open and hide the panel, so we initialize the API of the richlistbox.
this._panel.width = 1;
this._panel.height = 1;
this._panel.openPopup(null, "overlap", 0, 0, false, false);
this._panel.hidePopup();
this._panel.width = "";
this._panel.height = "";
+ this._panel.style.opacity = 0;
}
else {
this._list = this._panel.firstChild;
}
}
AutocompletePopup.prototype = {
_document: null,
Comment 1•12 years ago
|
||
A css delay might also not solve the problem, given that people have different typing speed, so the delay for which the popup does not appears for you, might not be the same for everyone else.
Why do you exactly not want to see the popup itself. I mean it is meant to be useful, and after bug 835899 lands, it will be even more helpful in fast coding. You will be able to press tab to quickly complete the word.
bug 831693 already takes care of the popup not overlapping or having an offset from input box while appearing, so it should be less annoying.
Reporter | ||
Comment 2•12 years ago
|
||
> Why do you exactly not want to see the popup itself. I mean it is meant to be
> useful, and after bug 835899 lands, it will be even more helpful in fast coding.
> You will be able to press tab to quickly complete the word.
I'm not against the feature. Sometimes it *is* useful!
But I am willing to go ahead and make a blanket statement that any time a UI element appears and disappears several times a second, in different places, during perfectly normal usage of a product, that is a UI design mistake. Not being a UI guy it is a little hard for me to articulate why. It just seems obviously absurd. And there's a simple workaround that will work for some people at least.
Comment 3•12 years ago
|
||
Jason, agreed. Thanks for your bug report.
Girish, this needs to be fixed. One possible way to get this fixed is to add a delay for show, and another short delay for hide - such that the popup won't show/hide too fast during typing. The delays should not impact the actual popup content updates - they should continue to be instant. The fixes you have in bug 835899 and its dependency make it behave better, but Jason's report continues to be valid.
I'm not sure which kind of delay is to be preferred (css, js, how long, etc). This will need to be investigated when a fix is implemented.
Comment 4•12 years ago
|
||
So if this needs to be implemented here are my thoughts on how:
- Have a delay option in the panel, the panel opens (or whatever way , shows) after that delay.
- If there is another trigger to open the popup before that delay, the previous one gets cancelled.
- There should be a trigger to stop the scheduled opening of panel, or that could be simply done by caling closePopup method.( ?)
Updated•12 years ago
|
Priority: -- → P3
Whiteboard: [autocomplete]
Updated•7 years ago
|
Product: Firefox → DevTools
Comment 5•6 years ago
|
||
Bug 1541352 will probably make this a tad better, as we are going to delay the autocompletion request (as long as you type as fast as 75ms per key stroke). I guess we could close this bug when Bug 1541352 lands?
You can also flip devtools.webconsole.input.autocomplete
to false in about:config
. We won't do any autocomplete request so you can type safely. The autocomplete popup can then be summoned with Ctrl+Space
if you need it (it does behave a bit weird though, see Bug 1539816).
Comment 6•6 years ago
|
||
Jason, is the current behavior good enough to close this bug?
Flags: needinfo?(jorendorff)
Reporter | ||
Comment 7•6 years ago
|
||
It doesn't seem like that should be up to me.
Also, I may have been wrong in comment 2. I don't use the console every day for my work.
Flags: needinfo?(jorendorff)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•