'+
''+
''+recenttitle+'
'+
@@ -139,10 +150,10 @@
//! Handler for onload javascript event.
this.loadComplete = function()
{
- var urlSearchSz = snippets.UrlSearchChromeId.getGeometry();
+ var urlSearchSz = snippets[urlSnippetId].getGeometry();
urlSearchHeight = urlSearchSz.height;
- snippets.SuggestsChromeId.anchorTo("UrlSearchChromeId", suggestsXOffset, urlSearchHeight);
+ snippets.SuggestsChromeId.anchorTo(urlSnippetId, suggestsXOffset, urlSearchHeight);
snippets.SuggestsChromeId.zValue = 10;
_setMaxHeight(); // calculate max suggest list height
@@ -210,7 +221,10 @@
*/
this.handleExternalMouseEvent = function(type, name, description)
{
- if (name == "MouseClick") {
+ // external mouse event received on VKB mouse clicks and
+ // suggest list mouse clicks both of which should be ignored
+ if ((name == "MouseClick") && !urlHasFoucus
+ && !snippets.SuggestsChromeId.hasFocus) {
_hideSuggests();
}
}
@@ -230,20 +244,21 @@
//! the load state is editing.
this.updateLoadState = function()
{
- if (pageController.loadState != Suggests.GotoModeEditing) {
- // loading or reloadable - suggests not ok
+ if (!pageController.editMode) {
+ // not in editing mode - suggests not allowed
_hideSuggests(); // ensure suggests are hidden
}
}
- //! Called when URL search bar looses focus. The external mouse event
+ //! Called when URL search bar focus changes. The external mouse event
//! handler deals with most cases where the suggestion list should be
//! dismissed but we don't get those events when the list isn't visible
//! so this handler is needed to cancel the timer in those cases.
- this.urlSearchLostFocus = function()
+ this.urlSearchFocusChanged = function(focusIn)
{
+ urlHasFoucus = focusIn;
// if visible user may be scrolling suggestion page so ignore focus change
- if (!snippets.SuggestsChromeId.visible) {
+ if (!focusIn && !snippets.SuggestsChromeId.visible) {
// prevent suggestion list from being displayed until URL edited again
clearTimeout(inputTimeoutId);
}
@@ -259,5 +274,3 @@
}
}
-// we don't have access to WRT::LoadController::GotoModeEditing
-Suggests.GotoModeEditing = 1;