This is a last-minute nudges/tips bug that Harry found today. It's a problem on 72 and later versions. I don't think it's a show stopper -- we could ship the extension with it -- but I also think we should fix it. We should able to do it entirely from the add-on without landing any production code in m-c, but it will require an experiment API addition. When the redirect tip is shown (for example on google.com), the input correctly is empty, but when you then click the tip's "Okay, Got It" button, the input's value is set to the page's URL. So you have to clear the input before you can search. It should remain empty when you click the button. Harry found this while porting the extension in bug 1606909. The value is set to the URL by the handleRevert call here: https://searchfox.org/mozilla-central/source/browser/components/urlbar/UrlbarInput.jsm#615 The stack is: _setValue (UrlbarInput.jsm#1076) value (UrlbarInput.jsm#941) URLBarSetURI (browser.js#3390) handleRevert (UrlbarInput.jsm#434) pickElement (UrlbarInput.jsm#615) _on_mouseup (UrlbarView.jsm#1424) handleEvent (UrlbarView.jsm#499)
Bug 1608601 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This is a last-minute nudges/tips bug that Harry found today. It's a problem on 72 and later versions. I don't think it's a show stopper -- we could ship the extension with it -- but I also think we should fix it. We should able to do it entirely from the add-on without landing any production code in m-c, but it will require an experiment API addition. When the redirect tip is shown (for example on google.com), the input correctly is empty, but when you then click the tip's "Okay, Got It" button, the input's value is set to the page's URL. So you have to clear the input before you can search. It should remain empty when you click the button. Harry found this while porting the extension in bug 1606909. The value is set to the URL by the handleRevert call here: https://searchfox.org/mozilla-central/rev/d4d6f81e0ab479cde192453bae83d5e3edfb39d6/browser/components/urlbar/UrlbarInput.jsm#615 The stack is: _setValue (UrlbarInput.jsm#1076) value (UrlbarInput.jsm#941) URLBarSetURI (browser.js#3390) handleRevert (UrlbarInput.jsm#434) pickElement (UrlbarInput.jsm#615) _on_mouseup (UrlbarView.jsm#1424) handleEvent (UrlbarView.jsm#499)