Closed
Bug 588967
Opened 14 years ago
Closed 14 years ago
Console input field doesn't resize
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
VERIFIED
FIXED
Firefox 4.0b7
People
(Reporter: pcwalton, Assigned: pcwalton)
References
Details
(Whiteboard: [Web-Console-Testday])
Attachments
(2 files)
12.34 KB,
patch
|
msucan
:
feedback+
|
Details | Diff | Splinter Review |
12.29 KB,
patch
|
dietrich
:
review+
dietrich
:
approval2.0+
|
Details | Diff | Splinter Review |
The input field in the Web Console doesn't resize when long lines are entered anymore.
Assignee | ||
Updated•14 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•14 years ago
|
||
Proposed patch attached. This patch changes input resizing from row-based to pixel-based (which is needed as far as I can tell to account for word wrap). Because we work in terms of rows now (not pixels), a hard limit on the number of displayed rows is no longer easy to do, so I've removed that limit. Feedback requested.
Attachment #472888 -
Flags: feedback?(mihai.sucan)
Updated•14 years ago
|
Comment 2•14 years ago
|
||
Comment on attachment 472888 [details] [diff] [review] Proposed patch. The patch looks good. Minor issues: - case 101: setTimeout() function declares var endPos which seems unused. Perhaps you can remove it. - again, tabBrowser misnomer, selectedBrowser instead of getBrowserForTab(). - the test file triggers an exception inside the HUDService, at the end, even if it passes all tests: TEST-INFO | chrome://mochikit/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588967_input_expansion.js | Console message: [JavaScript Error: "[Exception... "'Error: Cannot get outputNode by id' when calling method: [nsIConsoleListener::observe]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]"] This looks like a bug in HUDService. I think you can avoid it by running finish() a bit later - maybe executeSoon(finish) does the trick.
Attachment #472888 -
Flags: feedback?(mihai.sucan) → feedback+
Comment 3•14 years ago
|
||
I also wanted to add that when the input wraps to two lines (or more), when I write a long line, it's not intuitive in the sense that I can't use the Up/Down arrow keys to go from one line to another - it considers everything as a single line - not like in a normal textarea. Reminds me of vim behavior (k/j versus gk/gj). Not sure you can do anything about this, except maybe to switch to a different input type - a XUL textarea?
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to comment #2) > Comment on attachment 472888 [details] [diff] [review] > - the test file triggers an exception inside the HUDService, at the end, even > if it passes all tests: > > TEST-INFO | > chrome://mochikit/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_588967_input_expansion.js > | Console message: [JavaScript Error: "[Exception... "'Error: Cannot get > outputNode by id' when calling method: [nsIConsoleListener::observe]" > nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" > data: no]"] > > This looks like a bug in HUDService. I think you can avoid it by running > finish() a bit later - maybe executeSoon(finish) does the trick. This is part of the test console.html page. I've avoided introducing a new HTML page to reduce churn; this is better as a followup bug to bug 581069 IMO.
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #3) > I also wanted to add that when the input wraps to two lines (or more), when I > write a long line, it's not intuitive in the sense that I can't use the Up/Down > arrow keys to go from one line to another - it considers everything as a single > line - not like in a normal textarea. Reminds me of vim behavior (k/j versus > gk/gj). Not sure you can do anything about this, except maybe to switch to a > different input type - a XUL textarea? We're already on the XUL equivalent of a textarea. This is actually a problem with the caretInFirstLine()/caretInLastLine() logic. I've filed a followup: bug 594497.
Assignee | ||
Comment 6•14 years ago
|
||
Patch version 1.1 addresses feedback comments. Review requested.
Attachment #473165 -
Flags: review?(dietrich)
Updated•14 years ago
|
Attachment #473165 -
Flags: review?(dietrich)
Attachment #473165 -
Flags: review+
Attachment #473165 -
Flags: approval2.0+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 7•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/976d2a371fe3
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b6
Updated•14 years ago
|
Status: RESOLVED → VERIFIED
Whiteboard: [Web-Console-Testday]
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•