Bug 516724: Taps in the awesomescreen above/below items don't register as hits, r=mfinkle

This commit is contained in:
Ben Combee 2009-09-15 13:06:21 -04:00
Родитель 718373c532
Коммит c550b16e63
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -356,16 +356,20 @@
<handlers> <handlers>
<handler event="click" button="0"> <handler event="click" button="0">
<![CDATA[ <![CDATA[
let originalTarget = event.originalTarget; let target = event.originalTarget;
let target = originalTarget.parentNode; if (target.localName != "autocompleteresult")
if (originalTarget == this._allBookmarksItem || target == this._allBookmarksItem) { target = target.parentNode;
if (target.localName != "autocompleteresult")
return;
if (target == this._allBookmarksItem) {
// XXX bug 516575 // XXX bug 516575
// select the item, since closing the popup can be slow... // select the item, since closing the popup can be slow...
// we should stop doing this when that isn't the case // we should stop doing this when that isn't the case
this.selectedIndex = 0; this.selectedIndex = 0;
this.close(); this.close();
CommandUpdater.doCommand("cmd_bookmarks"); CommandUpdater.doCommand("cmd_bookmarks");
} else if (target.localName == "autocompleteresult" && target._empty != true) { } else if (!target._empty) {
let offset = this._allBookmarksItem._hidden ? 0 : 1; let offset = this._allBookmarksItem._hidden ? 0 : 1;
// XXX bug 516575 // XXX bug 516575
// same as above - we can just set _selectedIndex directly to avoid // same as above - we can just set _selectedIndex directly to avoid