Last Comment Bug 346111 - [10.4] 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 ...
Status: RESOLVED FIXED
: fixed1.8.0.9, fixed1.8.1
Product: Camino Graveyard
Classification: Graveyard
Component: Location Bar & Autocomplete (show other bugs)
: unspecified
: PowerPC Mac OS X
-- normal (vote)
: Camino1.5
Assigned To: Stuart Morgan
:
:
Mentors:
: 351008 367824 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-27 09:19 PDT by Percy
Modified: 2007-01-22 21:35 PST (History)
8 users (show)
alqahira: camino1.0.4+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
fix (1.40 KB, patch)
2006-09-23 09:49 PDT, Stuart Morgan
bugzilla-graveyard: review+
sfraser_bugs: superreview+
Details | Diff | Splinter Review
fix with renaming (4.80 KB, patch)
2006-09-26 07:11 PDT, Stuart Morgan
no flags Details | Diff | Splinter Review

Description User image Percy 2006-07-27 09:19:31 PDT
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.
Comment 1 User image Smokey Ardisson (offline for a while; not following bugs - do not email) 2006-07-27 09:45:15 PDT
This WFM on 10.3.9 with the latest branch nightly.
Comment 2 User image Stuart Morgan 2006-07-27 20:54:52 PDT
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.
Comment 3 User image Stuart Morgan 2006-07-27 22:24:40 PDT
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.
Comment 4 User image Maximilian Ruderburg [:max] (Arctic Revolution) 2006-08-29 23:21:01 PDT
I can't reproduce this on PPC, only Intel. Stuart, can you confirm that?
Comment 5 User image Smokey Ardisson (offline for a while; not following bugs - do not email) 2006-09-01 10:09:01 PDT
Putting this on the 1.1 list, as it seems potentially serious (esp. if bug 351008 is related).
Comment 6 User image Smokey Ardisson (offline for a while; not following bugs - do not email) 2006-09-05 10:23:56 PDT
mento, can you take a look at this (and possibly bug 351008), which seem like they're Intel-only.
Comment 7 User image Stuart Morgan 2006-09-20 20:40:34 PDT
*** Bug 351008 has been marked as a duplicate of this bug. ***
Comment 8 User image Stuart Morgan 2006-09-20 20:56:39 PDT
Taking; this will be easy to fix.
Comment 9 User image Stuart Morgan 2006-09-23 09:49:46 PDT
Created attachment 239801 [details] [diff] [review]
fix

Always return the right type for the icon column.
Comment 10 User image Chris Lawson (gone) 2006-09-23 21:12:18 PDT
Comment on attachment 239801 [details] [diff] [review]
fix

Looks good.
Comment 11 User image Simon Fraser 2006-09-25 22:16:04 PDT
Comment on attachment 239801 [details] [diff] [review]
fix

Bonus points if you rename 'aColumn' to 'aColumnIdentifier'.
Comment 12 User image Stuart Morgan 2006-09-26 07:11:15 PDT
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.
Comment 13 User image froodian (Ian Leue) 2006-09-26 15:25:16 PDT
Checked in on 1.8branch and trunk.
Comment 14 User image Smokey Ardisson (offline for a while; not following bugs - do not email) 2006-09-30 01:29:49 PDT
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.
Comment 15 User image froodian (Ian Leue) 2006-12-13 17:42:08 PST
Checked in on 1.8.0branch for 1.0.4
Comment 16 User image Smokey Ardisson (offline for a while; not following bugs - do not email) 2007-01-22 21:35:59 PST
*** Bug 367824 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.