-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Restore current page URL when urlbar is emptied and blurred #12322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
fix: Restore current page URL when urlbar is emptied and blurred #12322
Conversation
839c606 to
46555e7
Compare
|
Hi @mr-cheffy , I have just committed a new update. The previous CI failed because the patch file had incorrect hunk headers. When I added 2 new lines to the endLayoutExtend() hunk (changing it from +2627,24 to +2627,26), I didn't update the + side start line numbers in all 18 subsequent hunk headers. They were each off by 2. git apply strictly validates these offsets, so it reported corrupt patch at line 153. The fix was straightforward: bump the + side start line number by 2 for every hunk after the modified one (e.g. +2675 → +2677, +2929 → +2931, etc.). The actual code change itself remains unchanged, with only the patch metadata corrected. Thanks. |
|
Im sorry, but is this patch AI generated? Where are these random numbers coming from? How are you creating the patch file? |
|
Yes, AI did help in this. Actually the code change is just 3 lines in endLayoutExtend(), adding an else if branch to call handleRevert() when the urlbar is empty on blur. But since this project works with .patch files rather than source files directly, I edited the patch file manually, which caused the hunk header line numbers to be off and broke CI. Seems like it is still causing it. Should I try with run the project's import/apply command to apply patches to the actual Firefox source and then make the code change in the UrlbarInput.mjs code for fixes? |
|
|
…o-bug, c=no-component When users click the address bar, clear all text, and then click away to blur, the urlbar stays empty instead of restoring the current page URL. This adds a handleRevert() call on blur when the urlbar content is empty (non-newtab mode), so the current page URL is properly restored. Partial input is still preserved on blur as before.
46555e7 to
50eabfb
Compare
|
Hi @mr-cheffy , I have just force committed the new update. I've downloaded the firefox engine, ran surfer import, made the code change directly in UrlbarInput.mjs, and used surfer export to regenerate the patch file. All line numbers are now auto-generated by the tooling. I've also built and tested locally, and the fix works as expected:
|
Summary
handleRevert()call inendLayoutExtend()for the non-newtab path when_untrimmedValueis empty, restoring the current page URL on blurTest plan