Last Comment Bug 676520 - GCLI fails to read from input element when embedded
: GCLI fails to read from input element when embedded
[minotaur][best:1d, likely:3d, worst:5d]
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: unspecified
: x86_64 Windows 7
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: J. Ryan Stinnett [:jryans] (use ni?)
Depends on:
  Show dependency treegraph
Reported: 2011-08-04 06:20 PDT by Joe Walker [:jwalker] (needinfo me or ping on irc)
Modified: 2011-08-22 00:52 PDT (History)
0 users
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-08-04 06:20:10 PDT
HUDService creates a textbox for GCLI (line 6910)

    this.inputNode = this.document.createElement("textbox");
    this.inputNode.setAttribute("class", "gcliterm-input-node");
    this.inputNode.setAttribute("multiline", "true");
    this.inputNode.setAttribute("rows", "1");

This is passed to GCLI (line 6849)

    document: this.document,
    inputElement: this.inputNode,
    completeElement: this.completeNode,
    inputBackgroundElement: this.inputStack,
    completionPrompt: ''

It the inputElement is passed to inputter.js and used as this.element (line 75)

When we read from the element, value is empty even when something has been typed in.
Comment 1 User image Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-08-04 06:21:10 PDT
For the sake of posterity some debug code we were using in Inputter.updateCli:

  console.debug('input', input);
  console.debug('this.element', this.element);
  console.debug('gOPDv1', Object.getOwnPropertyDescriptor(this.element, 'value'));
  console.debug('this.completer.element', this.completer.element);
  console.debug('gOPDv2', Object.getOwnPropertyDescriptor(this.completer.element, 'value'));
  console.debug('_lS_v', this.element.__lookupSetter__('value'));

  var textbox = this.element;
  console.debug('textbox.value === undefined', textbox.value === undefined);
  //console.debug('textbox.getAttribute(value).length', textbox.getAttribute('value').length);
  console.debug('textbox.selectionStart', textbox.selectionStart);
  console.debug('textbox.type', textbox.getAttribute('type'));
  console.debug('textbox.size', textbox.getAttribute('size'));
Comment 2 User image Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-08-19 09:02:37 PDT
Bug 680453 is the result of some study into this problem.
We have a workaround for now.

Note You need to log in before you can comment on or make changes to this bug.