Closed Bug 1557942 Opened 2 years ago Closed 2 years ago

Remove unnecessary usage of `closest()` from searchbar.js

Categories

(Firefox :: Search, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: ntim, Assigned: surkov)

References

(Regression)

Details

Attachments

(1 file)

Post reviewing bug 1556561, I noticed that I forgot to remove an usage of closest() that's no longer useful after bug 1534404:

https://hg.mozilla.org/integration/autoland/rev/a29be90ae608#l4.125

The anchor variable can go away and be replaced with this, meaning this block can change to:

let { width } = this.getBoundingRect();
popup.setAttribute("width", width > 100 ? width : 100);
 
// invalidate() depends on the width attribute
popup._invalidate();

popup.openPopup(this, "after_start");
Summary: Remove unnecessary usage of `closest()` in searchbar.js → Remove unnecessary usage of `closest()` from searchbar.js
Regressed by: 1556561
No longer regressed by: 1534404
Assignee: nobody → surkov.alexander
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/41b11698353c
Remove unnecessary usage of closest() from searchbar.js r=ntim
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.