Fixing some autocompletion stuff
This commit is contained in:
parent
3050d092e7
commit
ed0d2b7f54
3 changed files with 15 additions and 1 deletions
|
@ -4,6 +4,7 @@ body
|
|||
color : #888;
|
||||
font-family : Terminus, courier, monospace, fixed;
|
||||
font-size : 13px;
|
||||
tabindex : -1;
|
||||
}
|
||||
|
||||
input.promptInput
|
||||
|
@ -24,11 +25,13 @@ div#blashWindow
|
|||
padding : 10px;
|
||||
border : 1px solid #888;
|
||||
overflow : auto;
|
||||
tabindex : -1;
|
||||
}
|
||||
|
||||
a.bannerLink
|
||||
{
|
||||
color : white;
|
||||
tabindex : -1;
|
||||
}
|
||||
|
||||
span.directory
|
||||
|
@ -39,11 +42,13 @@ span.directory
|
|||
a
|
||||
{
|
||||
color : green;
|
||||
tabindex : -1;
|
||||
}
|
||||
|
||||
a:visited
|
||||
{
|
||||
color : green;
|
||||
tabindex : -1;
|
||||
}
|
||||
|
||||
span.syntax
|
||||
|
|
9
blash.js
9
blash.js
|
@ -160,6 +160,7 @@ function blash ()
|
|||
this.prompt.setAttribute ( 'autocomplete', 'off' );
|
||||
this.prompt.setAttribute ( 'onkeydown', 'shell.getKey ( event )' );
|
||||
this.prompt.setAttribute ( 'onkeyup', 'this.focus()' );
|
||||
this.prompt.setAttribute ( 'onblur', 'return false' );
|
||||
|
||||
this.cmdOut = document.createElement ( 'div' );
|
||||
this.cmdOut.setAttribute ( 'id', 'blashCmdOut' );
|
||||
|
@ -263,6 +264,14 @@ function blash ()
|
|||
}
|
||||
|
||||
this.prompt.focus();
|
||||
setTimeout ( function() { shell.prompt.focus(); }, 1 );
|
||||
|
||||
if ( this.prompt.setSelectionRange )
|
||||
{
|
||||
this.prompt.setSelectionRange ( this.prompt.value.length, this.prompt.value.length );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
this.prompt.focus();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<body onload="shell = new blash()">
|
||||
<div id="blashWindow" onmouseup="shell.prompt.focus()">
|
||||
<span id="promptText" class="promptText"></span>
|
||||
<input type="text" class="promptInput" name="blashPrompt" autocomplete="off" onkeydown="shell.getKey ( event )" onkeyup="this.focus()"/>
|
||||
<input type="text" class="promptInput" name="blashPrompt" autocomplete="off" onkeydown="shell.getKey ( event )" onkeyup="this.focus()" onblur="return false"/>
|
||||
<span id="blashCmdOut" class="blashCmdOut"/></span>
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue