Eliminate Inline Event Handlers From FullPageTranslationsPanel
Categories
(Firefox :: Translations, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox131 | --- | fixed |
People
(Reporter: nordzilla, Assigned: tschuster, Mentored)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Description
See Bug 1890547 for more context.
See Bug 1891782 for an example of a similar bug to follow as a guide.
This bug tracks the progress of removing all inline event handlers from the FullPageTranslationsPanel markup.
We need to remove all of the inline event handlers from the FullPageTranslationsPanel markup and instead lazily initialize them in the JS file for the FullPageTranslationsPanel.
Steps to implement
- Remove all
oncommand
,onpopupshown
,onpopuphidden
inline event handlers from fullPageTranslationsPanel.inc.xhtml - Lazily initialize all relevant event listeners in fullPageTranslationsPanel.js
Tests to implement
- The changes should preserve the exact same behavior as before.
- Preexisting test coverage is sufficient.
Reporter | ||
Updated•6 months ago
|
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 1•3 months ago
|
||
Sorry. I didn't realize that we already had a good-first-bug for this before working on it.
Assignee | ||
Comment 2•3 months ago
|
||
Reporter | ||
Comment 3•3 months ago
|
||
(In reply to Tom Schuster (MoCo) [mostly OOO] from comment #1)
Sorry. I didn't realize that we already had a good-first-bug for this before working on it.
Hey Tom,
That's okay! I actually think I marked it as good-first-bug
before I realized about the subtle nuances in the way that oncommand
is handled differently for <menulist>
elements.
You can refer to my review comment regarding the details, but this bug is actually going to be a bit more involved than simply moving the calls from the markup to the JS.
Assignee | ||
Comment 4•2 months ago
|
||
Gijs just fwiw because I hadn't realized that issue with the command
event not triggering on <menulist>
items. I will try and see if we overlooked this in another bug before.
Comment 5•2 months ago
|
||
Thanks for the heads up. We don't have a lot of menulists in the browser.xhtml
code, so I'm not too worried. There's the content select dropdown (which already uses addEventListener
), and the webrtc popup dropdowns for cameras/screens/etc. which we haven't touched and also already use event listeners. It wouldn't hurt to doublecheck the patches we've done already, but I'd be surprised if there was anything there.
Assignee | ||
Comment 6•2 months ago
|
||
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 8•2 months ago
|
||
Comment 9•2 months ago
|
||
bugherder |
Assignee | ||
Updated•2 months ago
|
Comment 10•2 months ago
|
||
Comment 11•2 months ago
|
||
bugherder |
Description
•