diff options
| author | hallgren <hallgren@chalmers.se> | 2012-03-19 15:15:47 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-03-19 15:15:47 +0000 |
| commit | 428c2184fa1443842ccce99a4a802f21d783021f (patch) | |
| tree | d892fe73f926ee3c90466233fc07437417cce367 | |
| parent | 5a263337ce26681352c3fb13d34ec4409784930b (diff) | |
minibar: fix for recently introduced bug affacting Webkit browsers
It seems that in Gecko browsers, the effect of "with(x) stmts" reaches inside
the bodies of local functions in stmts, but in Webkit browers it does not.
| -rw-r--r-- | src/www/minibar/minibar.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/www/minibar/minibar.js b/src/www/minibar/minibar.js index d52e67881..86be6af7e 100644 --- a/src/www/minibar/minibar.js +++ b/src/www/minibar/minibar.js @@ -69,8 +69,9 @@ function Minibar(server,opts) { } Minibar.prototype.show_grammarlist=function(grammars) { - this.grammar_menu=empty_id("select","grammar_menu"); - with(this) { + var t=this; + t.grammar_menu=empty_id("select","grammar_menu"); + with(t) { if(grammars.length>1) { function opt(g) { return option(g,g); } appendChildren(grammar_menu,map(opt,grammars)); @@ -78,7 +79,7 @@ Minibar.prototype.show_grammarlist=function(grammars) { var grammar_name=grammar_menu.value if(window.localStorage) localStorage["gf.minibar.last_grammar"]=grammar_name; - select_grammar(grammar_name); + t.select_grammar(grammar_name); } grammar_menu.onchange=bind(pick,this); insertFirst(menubar,button("i",bind(show_grammarinfo,this))) |
