Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Temporary hack to make FireClosure work

81c3033 broke it, and we don't want to announce a broken addon... :(
This is why deeply integrated addons don't work.
  • Loading branch information...
commit 139aa2edbdfb44e8b109bfbbc4bd9caca118874b 1 parent ebcc5b8
@simonlindholm authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 extension/content/firebug/console/commandLine.js
View
14 extension/content/firebug/console/commandLine.js
@@ -657,6 +657,7 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
initializeUI: function()
{
+ this.onCommandLineFocus = Obj.bind(this.onCommandLineFocus, this);
this.onCommandLineInput = Obj.bind(this.onCommandLineInput, this);
this.onCommandLineOverflow = Obj.bind(this.onCommandLineOverflow, this);
this.onCommandLineKeyUp = Obj.bind(this.onCommandLineKeyUp, this);
@@ -669,6 +670,7 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
{
var commandLine = this.getSingleRowCommandLine();
+ Events.addEventListener(commandLine, "focus", this.onCommandLineFocus, true);
Events.addEventListener(commandLine, "input", this.onCommandLineInput, true);
Events.addEventListener(commandLine, "overflow", this.onCommandLineOverflow, true);
Events.addEventListener(commandLine, "keyup", this.onCommandLineKeyUp, true);
@@ -686,6 +688,7 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
if (this.commandHistory)
this.commandHistory.detachListeners();
+ Events.removeEventListener(commandLine, "focus", this.onCommandLineFocus, true);
Events.removeEventListener(commandLine, "input", this.onCommandLineInput, true);
Events.removeEventListener(commandLine, "overflow", this.onCommandLineOverflow, true);
Events.removeEventListener(commandLine, "keyup", this.onCommandLineKeyUp, true);
@@ -786,6 +789,17 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
return contentView._FirebugCommandLine;
},
+ onCommandLineFocus: function(event)
+ {
+ // XXX: Temporary hack to make FireClosure work (until that gets a new
+ // release out)
+ if (this.autoCompleter && !this.autoCompleter.shouldIncludeHint &&
+ Firebug.JSAutoCompleter.transformScopeExpr)
+ {
+ this.setAutoCompleter();
+ }
+ },
+
onCommandLineKeyUp: function(event)
{
},
Please sign in to comment.
Something went wrong with that request. Please try again.