This commit contains a small cluster of changes that jointly fix#286:
Connecting the urlbar to the popup in an XBL constructor works far
better than the old onFirstPopupOpen approach. This is a better way of
fixing #138, and it resolves the 'maxRows - 1 is undefined' error.
Disabling one-off search by disabling the pref and removing the one-off
search buttons from the XUL DOM (via hidden=true) closes#292,
closes#293, closes #298--but those bugs aren't really fixed, just
hidden. Filed #304 to re-enable one-off search as time allows. Note that
the disabletab attribute was added just to make the set of attributes in
our one-off-search-buttons element match the element in FF.)
Switching our popup.js listener from the 'popupshowing' event to the
'popupshown' event fixes#295, with some cascading changes related to
renaming the function and the signal fired by the function.
\o/
It turns out[1] that DOM Level 2 `addEventListener` handlers, when added
using JS, override XBL handlers for the same events. Nothing seems to
listen for the 'popuphidden' event that's fired just after
'popuphiding', and for our purposes (starting a metrics interaction
event, hiding the recommendation, resetting interaction state in the
highlight manager), either event works fine.
Update the pubsub event from 'before-popup-hide' to 'after-popup-hide',
so that our event names reflect the browser's reality as closely as
possible.
Fixes#164, closes#187.
[1] http://mb.eschew.org/15#sub_15.2.7.1
* Update metrics documentation to reflect reality.
* Assign the RecommendationRow to the Recommendation, so the metrics
ping can minimize hitting the DOM to get information.
* Fire an event when the popup is about to open, so the metrics code can
start listening for events.
* Fire an event when the popup detects a click, so the metrics code can
get an accurate selectedIndex value.
Fixes#18.