A 22-year-old Firefox bug was finally fixed by a young code contributor


What just happened? For the entire history of Mozilla’s Firefox project, users have occasionally experienced the infamous “persisting tooltip” bug. The issue has now been fixed for good, thanks to a code contribution by a programmer that’s just one year older than the bug itself.

Firefox bug 148624 was opened 22 years ago by a user of the “Mozilla Suite” internet browser on a Mac. The user in question experienced a weirdly persistent tooltip (a little yellow box with text description inside) after placing the mouse cursor over a web link. After moving Mozilla to the background with a keyboard shortcut, he said, the tooltip would stay on the screen until he brought the software to the foreground again and moved the mouse cursor away from the toolbar.

Mozilla Suite became Mozilla Firefox some years later, but the persistent tooltip bug had never been fixed. Until one month ago, that is, when Yifan Zhu decided to put an end to the software nuisance by himself. A first-year PhD student in Electrical Engineering at Stanford University, Zhu describes himself as an “occasional” minor contributor to the open-source software he uses, like Mozilla Firefox.

Before starting to analyze the tooltip bug, Zhu had zero experience with projects as complex as Firefox. He never contributed to the open-source software before, the PhD student confirms, but he was able to find the right clues in Firefox’s codebase to prepare a potential solution for the tooltip bug. The approach chosen by Zhu includes a new timer to show the tooltip that starts when the mouse hovers over some elements. The timer is then stopped when the mouse cursor loses focus.

بخونید:  مایکروسافت در حال آزمایش جایگزین CCleaner خود است

Zhu’s code fix was refined by a more experienced programmer (Cobos Álvarez), and it was finally accepted by Mozilla as part of the upcoming stable release of Firefox (119). The patch introduced some minor regressions elsewhere with Mozilla’s tooltip system, but it should finally solve one of the oldest (if not the oldest) and most annoying bugs ever experienced by the Firefox userbase.

Álvarez commented that the tooltip system is a “rather tricky” area in Firefox’s code, considering the number of configurations and operating systems the browser is designed to work on. Finding an elegant, working solution was therefore “pretty impressive” for a first-time Firefox contributor such as Yifan Zhu.

Being an open-source project with a long and complicated history, Firefox is well known for including minor bugs that are unlikely to get the right attention from some busy Mozilla developer anytime soon. Some bugs and software issues get eventually fixed after an ungodly number of years, some others are left to rot in the code while the overall browser market is moving forward at an accelerated pace.



منبع