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)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: info, Assigned: dion)

Details

Attachments

(1 file)

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
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.
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
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.
Ok it's a different error, it's because I'm running the frontend without the backend and this.settings is not correctly initialized.
Robert, Ah ok. Is it working for you on the live site after a shift-reload? Cheers, Dion
Yeah live is working :) Awesome work.
Great. Thanks so much for your time Robert.
Version: unspecified → Trunk
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.

Attachment

General

Creator:
Created:
Updated:
Size: