зеркало из https://github.com/mozilla/gecko-dev.git
Bug 300779. Allow multiple selection using keyboard in treeviews that use seltype multiple. r+sr=neil, a=bsmedberg
This commit is contained in:
Родитель
a5ea7b7872
Коммит
3034ce80f7
|
@ -477,9 +477,10 @@
|
|||
<handler event="keypress">
|
||||
<![CDATA[
|
||||
var c = this.currentIndex;
|
||||
if (event.charCode == ' '.charCodeAt(0)) {
|
||||
if (!this.view.selection.isSelected(c))
|
||||
if (event.charCode == ' '.charCodeAt(0) && !this.view.selection.single) {
|
||||
if (!this.view.selection.isSelected(c) || event.ctrlKey) {
|
||||
this.view.selection.toggleSelect(c);
|
||||
}
|
||||
}
|
||||
else if (!this.disableKeyNavigation && event.charCode > 0 &&
|
||||
!event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {
|
||||
|
|
|
@ -473,9 +473,10 @@
|
|||
<handler event="keypress">
|
||||
<![CDATA[
|
||||
var c = this.currentIndex;
|
||||
if (event.charCode == ' '.charCodeAt(0)) {
|
||||
if (!this.view.selection.isSelected(c))
|
||||
if (event.charCode == ' '.charCodeAt(0) && !this.view.selection.single) {
|
||||
if (!this.view.selection.isSelected(c) || event.ctrlKey) {
|
||||
this.view.selection.toggleSelect(c);
|
||||
}
|
||||
}
|
||||
else if (!this.disableKeyNavigation && event.charCode > 0 &&
|
||||
!event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче