mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 917777 - Don't override ctrl-a behavior. r=msucan
This commit is contained in:
parent
2d874bc4b3
commit
c5cb4164d2
@ -3980,30 +3980,6 @@ JSTerm.prototype = {
|
||||
|
||||
if (aEvent.ctrlKey) {
|
||||
switch (aEvent.charCode) {
|
||||
case 97:
|
||||
// control-a
|
||||
this.clearCompletion();
|
||||
|
||||
if (Services.appinfo.OS == "WINNT") {
|
||||
// Allow Select All on Windows.
|
||||
break;
|
||||
}
|
||||
|
||||
let lineBeginPos = 0;
|
||||
if (this.hasMultilineInput()) {
|
||||
// find index of closest newline <= to cursor
|
||||
for (let i = inputNode.selectionStart-1; i >= 0; i--) {
|
||||
if (inputNode.value.charAt(i) == "\r" ||
|
||||
inputNode.value.charAt(i) == "\n") {
|
||||
lineBeginPos = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
inputNode.setSelectionRange(lineBeginPos, lineBeginPos);
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
|
||||
case 101:
|
||||
// control-e
|
||||
if (Services.appinfo.OS == "WINNT") {
|
||||
|
Loading…
Reference in New Issue
Block a user