Browse files

Closes #563: Utils.delay is not a function [rs=Mardak]

Trying first Utils.delay() for Firefox 4, 5 Beta and 6 Aurora . If it gives exception , call Utils.nextTick() for latest Nightlies
(cherry picked from commit c179ad7)
  • Loading branch information...
1 parent d82a780 commit 7042acfc7dc27370c2ae3b6b57c88162d94ef2df @scrapmac scrapmac committed with Mardak Jun 17, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 speakWords/bootstrap.js
View
8 speakWords/bootstrap.js
@@ -144,7 +144,13 @@ function addKeywordSuggestions(window) {
justCompleted = true;
// Make sure the search suggestions show up
- Utils.delay(function() urlBar.controller.startSearch(urlBar.value));
+ // try calling delay() , if fails call nextTick() (For latest Nightlies)
+ try {
+ Utils.delay(function() urlBar.controller.startSearch(urlBar.value));
+ }
+ catch (e) {
+ Utils.nextTick(function() urlBar.controller.startSearch(urlBar.value));
+ }
});
}

0 comments on commit 7042acf

Please sign in to comment.