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;
|
color : #888;
|
||||||
font-family : Terminus, courier, monospace, fixed;
|
font-family : Terminus, courier, monospace, fixed;
|
||||||
font-size : 13px;
|
font-size : 13px;
|
||||||
|
tabindex : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.promptInput
|
input.promptInput
|
||||||
|
@ -24,11 +25,13 @@ div#blashWindow
|
||||||
padding : 10px;
|
padding : 10px;
|
||||||
border : 1px solid #888;
|
border : 1px solid #888;
|
||||||
overflow : auto;
|
overflow : auto;
|
||||||
|
tabindex : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.bannerLink
|
a.bannerLink
|
||||||
{
|
{
|
||||||
color : white;
|
color : white;
|
||||||
|
tabindex : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.directory
|
span.directory
|
||||||
|
@ -39,11 +42,13 @@ span.directory
|
||||||
a
|
a
|
||||||
{
|
{
|
||||||
color : green;
|
color : green;
|
||||||
|
tabindex : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:visited
|
a:visited
|
||||||
{
|
{
|
||||||
color : green;
|
color : green;
|
||||||
|
tabindex : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.syntax
|
span.syntax
|
||||||
|
|
9
blash.js
9
blash.js
|
@ -160,6 +160,7 @@ function blash ()
|
||||||
this.prompt.setAttribute ( 'autocomplete', 'off' );
|
this.prompt.setAttribute ( 'autocomplete', 'off' );
|
||||||
this.prompt.setAttribute ( 'onkeydown', 'shell.getKey ( event )' );
|
this.prompt.setAttribute ( 'onkeydown', 'shell.getKey ( event )' );
|
||||||
this.prompt.setAttribute ( 'onkeyup', 'this.focus()' );
|
this.prompt.setAttribute ( 'onkeyup', 'this.focus()' );
|
||||||
|
this.prompt.setAttribute ( 'onblur', 'return false' );
|
||||||
|
|
||||||
this.cmdOut = document.createElement ( 'div' );
|
this.cmdOut = document.createElement ( 'div' );
|
||||||
this.cmdOut.setAttribute ( 'id', 'blashCmdOut' );
|
this.cmdOut.setAttribute ( 'id', 'blashCmdOut' );
|
||||||
|
@ -263,6 +264,14 @@ function blash ()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.prompt.focus();
|
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();
|
this.prompt.focus();
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<body onload="shell = new blash()">
|
<body onload="shell = new blash()">
|
||||||
<div id="blashWindow" onmouseup="shell.prompt.focus()">
|
<div id="blashWindow" onmouseup="shell.prompt.focus()">
|
||||||
<span id="promptText" class="promptText"></span>
|
<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>
|
<span id="blashCmdOut" class="blashCmdOut"/></span>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue