Closed Bug 237803 Opened 22 years ago Closed 21 years ago

Unhiding the url bar doesn't update url address field to the currently displayed page

Categories

(Camino Graveyard :: Location Bar & Autocomplete, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino0.9

People

(Reporter: chrispetersen, Assigned: mikepinkerton)

Details

Attachments

(1 file, 1 obsolete file)

Build: 2004031508 Plaform: OS X 10.3.3 Expected Results: The url bar should display the currently displayed page url after unhiding it What I got: The url bar displays the url of a previous page when it was hidden Steps to reproduce: 1) Notice the url address displayed in the bar 2) Select Hide Toolbar from the View menu 3) Select any bookmark from the Bookmark menu 4) After page loads, select Show Toolbar from the View menu 5) Notice the url address shows the previous page and not the current one
Summary: Unhiding the url bar doesn't update url address field to currently displayed page → Unhiding the url bar doesn't update url address field to the currently displayed page
Target Milestone: --- → Camino0.9
Yup, happens using 2004050308 (v0.8b) on OS X 10.2.8, as well.
Attached patch Patch (obsolete) — Splinter Review
The problem still remains when clicking the 'toggle toolbar' widget on the window. Apparantly overloading the 'toggleToolbarShown' method is not enough.
> Apparantly overloading the 'toggleToolbarShown' method is not enough. Yes, that's just the menu-item action. The question is, why doesn't updateLocationFields: do its job when the toolbar is hidden? Is it not being called? Is mURLBar nil when the toolbar is hidden for some reason? It would be good if we knew where this is breaking down so we can try to fix it there. (On a code formatting not, please make sure your editor inserts spaces instead of tabs when making patches)
As for not being able to override the on-window toolbar toggling widget, I've filed bug 3703198 with Apple. Tom and I have tried, and from looking at the cocoa mailing list it appears as though Pinkerton did too. Even if it is possible, it is not documented or discoverable enough. I really think its not possible though.
The problem here is that in AutoCompleteTextField, setURI checks to see if the URI field has focus and handles autocomplete if it does. The way this is done is by comparing [self fieldEditor] to the firstResponder. If nothing has focus (and therefore there is no firstResponder) and the text field is hidden (and therefore there is no fieldEditor) AutoCompleteTextField believes the field has focus and attempts to use the editor to update the field. Checking for a nil fieldEditor fixes this and the field is updated properly whether it's hidden using the window button or using the menu item.
Attachment #151301 - Attachment is obsolete: true
Attachment #158943 - Flags: superreview?(pinkerton)
Attachment #158943 - Flags: review?(joshmoz)
Comment on attachment 158943 [details] [diff] [review] make sure the field editor is non-nill before comparing it to the firstResponder, which may be nil sr=pink
Attachment #158943 - Flags: superreview?(pinkerton)
Attachment #158943 - Flags: superreview+
Attachment #158943 - Flags: review?(joshmoz)
landed.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: