Closed Bug 1624333 Opened 4 years ago Closed 4 years ago

Instant Evaluation not showing correct values after using Delete/Del key on different function while autocomplete is opened

Categories

(DevTools :: Console, defect)

Desktop
All
defect
Not set
normal

Tracking

(firefox-esr68 unaffected, firefox74 disabled, firefox75 wontfix, firefox76 verified)

VERIFIED FIXED
Firefox 76
Tracking Status
firefox-esr68 --- unaffected
firefox74 --- disabled
firefox75 --- wontfix
firefox76 --- verified

People

(Reporter: atrif, Assigned: nchevobbe)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image evaluation_del_0.gif
  • Affected versions*

  • 76.0a1 (20200323092419)

  • 75.0b7 (20200322132212)

  • Affected platforms*

  • Windows 10 x64

  • Ubuntu 18.04

  • macOs 10.12

Steps to reproduce

  1. Open Firefox and Web Console.
  2. Set a=1 and b=2.
  3. Write a*b and use the down arrow key to go to the “blur” item on the autocomplete popup.
  4. Hit Delete/ Del key on the keyboard.

Expected result

  • The result for evaluation is 2.

Actual result

  • The result is NaN.

Regression Range

  • I will search for one ASAP if there is one

Notes

  • Attached a screen recording with the issue.
Has Regression Range: --- → no
Has STR: --- → yes

erf, I didn't even remembered that hitting del hides the autocomplete

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

If the delete key is pressed, even if the input isn't modified,
codeMirror will still emit _onEditorBeforeChange, which would
close the popup in the end.
That's not something we should do, so in this patch, we bail out
if we detect that there was no changes in the input.
A test is added to ensure this works as expected and we avoid
regression.

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Attaching the regressor here when having the expected result from comment 0.

Last good revision: 2af05f5f68ed7d4e1815103a827c6e1bcf7c2c66
First bad revision: 90a1f213a11a141ce71f66fac440af9b9de73adb
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=2af05f5f68ed7d4e1815103a827c6e1bcf7c2c66&tochange=90a1f213a11a141ce71f66fac440af9b9de73adb

Has Regression Range: no → yes
Regressed by: 1614841
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1fe283e3bb59
Don't close autocomplete popup when pressing Delete key. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
Flags: in-testsuite+

Verified the issue using Firefox 76.0a1 (20200326213652) on Windows 10x64, macOS 10.12 and Ubuntu 18.04. The autocomplete popup menu is no longer closed after pressing the Delete key.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.