[10.4] javascript:alert() typed in location bar doesn't close if loaded from autocomplete drop-down

RESOLVED FIXED in Camino1.5

Status

Camino Graveyard
Location Bar & Autocomplete
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: Percy, Assigned: Stuart Morgan)

Tracking

({fixed1.8.0.9, fixed1.8.1})

unspecified
Camino1.5
PowerPC
Mac OS X
fixed1.8.0.9, fixed1.8.1

Details

Attachments

(1 attachment, 1 obsolete attachment)

4.80 KB, patch
Details | Diff | Splinter Review
(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.4) Gecko/20060613 Camino/1.0.2
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.4) Gecko/20060613 Camino/1.0.2

When loading a javascript:alert() URL from the history drop-down list, the alert window does not close.

Reproducible: Always

Steps to Reproduce:
1. Type in a javascript:alert() such as javascript:alert('Hello'); in the location bar.
2. Close the alert() window.
3. Go back to the location bar and start typing in "javascript...", then select the full "javascript:alert('hello');" from the drop-down, and hit enter.
4. Try to close the alert() window...
Actual Results:  
Cannot close alert() window produced by selecting a alert() from the drop-down.

Expected Results:  
alert() window would close as it did the first time you typed in the javascript: URL.
This WFM on 10.3.9 with the latest branch nightly.
URL: n/a
Component: History → Location Bar & Autocomplete
QA Contact: history → location.bar
Summary: javascript:alert() typed in location bar doesn't close if loaded from history drop-down → javascript:alert() typed in location bar doesn't close if loaded from autocomplete drop-down
(Assignee)

Comment 2

11 years ago
I can confirm this; 10.4.7, 2006-06-24 branch.  Console shows:
Camino[9706] Exception caught in safeRunModalForWindow:relativeToWindow: NSImageCell's object value must be an NSImage.
when it happens.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: javascript:alert() typed in location bar doesn't close if loaded from autocomplete drop-down → [10.4] javascript:alert() typed in location bar doesn't close if loaded from autocomplete drop-down
(Assignee)

Comment 3

11 years ago
For whatever reason, the autocomplete list is still trying to be drawn after the results have been cleared.  -[AutoCompleteDataSource resultString:column:] is being called for row 0, col "icon" when there are no rows, which is hitting

112   NSString* result = @"";
113   
114   if (!mResults)
115     return result;

Obviously, @"" makes for a bad icon.
I can't reproduce this on PPC, only Intel. Stuart, can you confirm that?
Putting this on the 1.1 list, as it seems potentially serious (esp. if bug 351008 is related).
Target Milestone: --- → Camino1.1
mento, can you take a look at this (and possibly bug 351008), which seem like they're Intel-only.
(Assignee)

Comment 7

11 years ago
*** Bug 351008 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 8

11 years ago
Taking; this will be easy to fix.
Assignee: nobody → stuart.morgan
(Assignee)

Comment 9

11 years ago
Created attachment 239801 [details] [diff] [review]
fix

Always return the right type for the icon column.
Attachment #239801 - Flags: review?

Comment 10

11 years ago
Comment on attachment 239801 [details] [diff] [review]
fix

Looks good.
Attachment #239801 - Flags: review? → review+
(Assignee)

Updated

11 years ago
Attachment #239801 - Flags: superreview?(sfraser_bugs)

Comment 11

11 years ago
Comment on attachment 239801 [details] [diff] [review]
fix

Bonus points if you rename 'aColumn' to 'aColumnIdentifier'.
Attachment #239801 - Flags: superreview?(sfraser_bugs) → superreview+

Updated

11 years ago
Whiteboard: [needs checkin]
(Assignee)

Comment 12

11 years ago
Created attachment 240147 [details] [diff] [review]
fix with renaming

Version to check in.  For double-bonus points, it not only does the above but also renames the method, since having a method called "resultString:..." return icons is uncool.
Attachment #239801 - Attachment is obsolete: true

Comment 13

11 years ago
Checked in on 1.8branch and trunk.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [needs checkin]
Given bug 354918 and the fact that this bug was originally reported against 1.0.x, and the evil bug 351008, nominating this for 1.0.4.
Flags: camino1.0.4?
Flags: camino1.0.4? → camino1.0.4+
Whiteboard: [needs checkin 180 branch]

Comment 15

11 years ago
Checked in on 1.8.0branch for 1.0.4
Keywords: fixed1.8.0.9
Whiteboard: [needs checkin 180 branch]
Duplicate of this bug: 367824
You need to log in before you can comment on or make changes to this bug.