Closed Bug 500829 Opened 15 years ago Closed 15 years ago

Clicking empty space in awesome bar history list reloads current page

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: aakashd, Assigned: vingtetun)

Details

(Whiteboard: [fennectestday])

Attachments

(1 file, 2 obsolete files)

Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090626 Fennec/1.0b2

screencast: http://screencast.com/t/LBlu2hOtUy

Steps to Reproduce:
1. Clear your history and go to websites.
2. Click on the url bar to enable the history list.
3. tap/click on the whitespace.

Actual Result: 
Current page is reloaded.

Expected Result:
Nothing should happen.
Whiteboard: [fennectestday]
Attached patch Patch (obsolete) — Splinter Review
Prevent calling goToURI if we are clicking on an empty label
Might be nicer to set an _empty property on empty elements in invalidate() and use that instead?
(In reply to comment #2)
> Might be nicer to set an _empty property on empty elements in invalidate() and
> use that instead?

Probably.
But I supposed the cleaner way is to remove the 7 initial empty label elements (seems to be used only for displaying 'No results') which appears to cause the problems ?
They're there as an optimization to avoid having to dynamically add many elements at once during the first invalidate() call. It may be a useless optimization, but even without it we don't want to remove elements once we've added them, so after the first invalidate() you could still have this problem.
Attached patch Patch V0.2 (obsolete) — Splinter Review
Ok. I've not see that.

Is that what you mean or do you prefer to use a setAttribute/getAttribute instead?
Attachment #385535 - Attachment is obsolete: true
That looks good, but you need to reset _empty to false in the other branch, otherwise entries won't be selectable after an empty popup appears.

Always best to avoid getAttribute/setAttribute in favor of JS properties where possible, to avoid the need to go through xpconnect.
Attached patch Patch V0.3Splinter Review
(In reply to comment #6)
> That looks good, but you need to reset _empty to false in the other branch,
> otherwise entries won't be selectable after an empty popup appears.
>

Sounds obvious... :s

> Always best to avoid getAttribute/setAttribute in favor of JS properties where
> possible, to avoid the need to go through xpconnect.

Ok.
Attachment #385716 - Attachment is obsolete: true
Assignee: nobody → 21
pushed: http://hg.mozilla.org/mobile-browser/rev/3909514e31d9
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
verified FIXED on 

Build Id: Mozilla/5.0 (Windows; U; WindowsCE 5.2; en-US; rv:1.9.2a1pre)
Gecko/20090803 Fennec/1.0a3pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: