Closed
Bug 478386
Opened 16 years ago
Closed 16 years ago
Using tab for code indention focusses the command line
Categories
(Skywriter Graveyard :: General, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
0.2.x
People
(Reporter: info, Assigned: dion)
Details
Attachments
(1 file)
1.29 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/530.1+ (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Build Identifier: Build 9G55 osx version 1.5.6
When you use the TAB key to indent a piece of code, it will tab to / focus the command line.
Using WebKit nightly builds for the Mac.
Reproducible: Always
Steps to Reproduce:
1. Login to bespin
2. Open example.js
3.inside the function press enter to create a new line
4 press tab on that new line
Actual Results:
It focuses the command line
Expected Results:
It should indent.
http://unixpapa.com/js/testkey.html results for the tab key:
keydown keyCode=9 which=9 charCode=0
keyIdentifier=U+0009 keyLocation=0
shiftKey=false ctrlKey=false altKey=false metaKey=false
Comment 1•16 years ago
|
||
This patch inserts an <input> in the footer, does a poor job of making it invisible. And then hacks it's focus() to do a poor job of inserting a \t in the model and then setting the focus back to the canvas.
I tried to use insertTab, but it didn't like me even when I used {pos:_editor.cursorPosition, nextchar:Bespin.Key.TAB} as the args. :(
However, this patch does 'fix' the bug, in a very hacky way.
Assignee | ||
Comment 2•16 years ago
|
||
Fixed in changeset d68784a3c00e
Robert, instead of doing an input hack, I do an Event.stop(e) in onkeydown in editor.js for keys that have an action (as TAB and BACKSPACE do).
Does that work for you?
Assignee: nobody → dion
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Priority: -- → P1
Resolution: --- → FIXED
Target Milestone: -- → 0.2
Comment 3•16 years ago
|
||
Now that I pulled and updated to the latest version: 386, TAB moves to the command line and the left and right keys do nothing. Although, up and down continue to move the cursor.
Comment 4•16 years ago
|
||
Ok it's a different error, it's because I'm running the frontend without the backend and this.settings is not correctly initialized.
Assignee | ||
Comment 5•16 years ago
|
||
Robert,
Ah ok. Is it working for you on the live site after a shift-reload?
Cheers,
Dion
Comment 6•16 years ago
|
||
Yeah live is working :) Awesome work.
Assignee | ||
Comment 7•16 years ago
|
||
Great. Thanks so much for your time Robert.
Updated•16 years ago
|
Version: unspecified → Trunk
Comment 8•16 years ago
|
||
This is a mass migration from Mozilla Labs :: Bespin to Bespin :: General.
This bug likely still needs to be triaged and categorized.
Component: Bespin → General
Product: Mozilla Labs → Bespin
QA Contact: bespin → general
Target Milestone: 0.2 → 0.2.x
You need to log in
before you can comment on or make changes to this bug.
Description
•