Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
6232f19d
Commit
6232f19d
authored
Jul 22, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Fixed bugs with focus and keydown events in function menu.
parent
765f3c67
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
20 deletions
+18
-20
apps/common/main/lib/component/Menu.js
apps/common/main/lib/component/Menu.js
+1
-1
apps/common/main/lib/extend/Bootstrap.js
apps/common/main/lib/extend/Bootstrap.js
+1
-1
apps/spreadsheeteditor/main/app/controller/CellEditor.js
apps/spreadsheeteditor/main/app/controller/CellEditor.js
+10
-15
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+2
-1
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+4
-2
No files found.
apps/common/main/lib/component/Menu.js
View file @
6232f19d
...
...
@@ -441,7 +441,7 @@ define([
onAfterHideMenu
:
function
(
e
)
{
this
.
trigger
(
'
hide:after
'
,
this
,
e
);
Common
.
NotificationCenter
.
trigger
(
'
menu:hide
'
);
Common
.
NotificationCenter
.
trigger
(
'
menu:hide
'
,
this
);
},
onAfterKeydownMenu
:
function
(
e
)
{
...
...
apps/common/main/lib/extend/Bootstrap.js
View file @
6232f19d
...
...
@@ -47,7 +47,7 @@ function onDropDownKeyDown(e) {
$parent
.
trigger
(
beforeEvent
);
if
(
$parent
.
hasClass
(
'
no-stop-propagate
'
))
{
if
(
arguments
.
length
>
1
&&
arguments
[
1
]
instanceof
jQuery
.
Event
)
if
(
arguments
.
length
>
1
&&
arguments
[
1
]
instanceof
Keyboard
Event
)
e
=
arguments
[
1
];
if
(
/^
(
38|40|27|13|9
)
$/
.
test
(
e
.
keyCode
)
&&
!
e
.
ctrlKey
&&
!
e
.
altKey
)
{
patchDropDownKeyDownAdditional
.
call
(
this
,
e
);
...
...
apps/spreadsheeteditor/main/app/controller/CellEditor.js
View file @
6232f19d
...
...
@@ -81,6 +81,7 @@ define([
Common
.
NotificationCenter
.
on
(
'
api:disconnect
'
,
_
.
bind
(
this
.
onApiDisconnect
,
this
));
Common
.
NotificationCenter
.
on
(
'
cells:range
'
,
_
.
bind
(
this
.
onCellsRange
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onLockDefNameManager
'
,
_
.
bind
(
this
.
onLockDefNameManager
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onInputKeyDown
'
,
_
.
bind
(
this
.
onInputKeyDown
,
this
));
return
this
;
},
...
...
@@ -92,6 +93,15 @@ define([
this
.
editor
.
btnNamedRanges
.
setVisible
(
this
.
mode
.
isEdit
&&
!
this
.
mode
.
isEditDiagram
&&
!
this
.
mode
.
isEditMailMerge
);
},
onInputKeyDown
:
function
(
e
)
{
if
(
Common
.
UI
.
Keys
.
UP
===
e
.
keyCode
||
Common
.
UI
.
Keys
.
DOWN
===
e
.
keyCode
||
Common
.
UI
.
Keys
.
TAB
===
e
.
keyCode
||
Common
.
UI
.
Keys
.
RETURN
===
e
.
keyCode
)
{
var
menu
=
$
(
'
#menu-formula-selection
'
);
// for formula menu
if
(
menu
.
hasClass
(
'
open
'
))
menu
.
find
(
'
.dropdown-menu
'
).
trigger
(
'
keydown
'
,
e
);
}
},
onLaunch
:
function
()
{
this
.
editor
=
this
.
createView
(
'
CellEditor
'
,{
el
:
'
#cell-editing-box
'
...
...
@@ -100,21 +110,6 @@ define([
this
.
bindViewEvents
(
this
.
editor
,
this
.
events
);
this
.
editor
.
$el
.
parent
().
find
(
'
.after
'
).
css
({
zIndex
:
'
4
'
});
// for spreadsheets - bug 23127
var
me
=
this
;
$
(
'
#ce-cell-content
'
).
keydown
(
function
(
e
)
{
if
(
Common
.
UI
.
Keys
.
ESC
===
e
.
keyCode
)
{
// me.api.asc_enableKeyEvents(true);
}
else
if
(
Common
.
UI
.
Keys
.
UP
===
e
.
keyCode
||
Common
.
UI
.
Keys
.
DOWN
===
e
.
keyCode
||
Common
.
UI
.
Keys
.
TAB
===
e
.
keyCode
||
Common
.
UI
.
Keys
.
RETURN
===
e
.
keyCode
)
{
var
menu
=
$
(
'
#menu-formula-selection
'
);
// for formula menu
if
(
menu
.
hasClass
(
'
open
'
))
menu
.
find
(
'
.dropdown-menu
'
).
trigger
(
'
keydown
'
,
e
);
// if (Common.UI.Keys.RETURN === e.keyCode)
// me.api.asc_enableKeyEvents(true);
}
});
this
.
editor
.
btnNamedRanges
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onNamedRangesMenu
,
this
))
.
on
(
'
show:before
'
,
_
.
bind
(
this
.
onNameBeforeShow
,
this
));
this
.
namedrange_locked
=
false
;
...
...
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
View file @
6232f19d
...
...
@@ -1451,7 +1451,7 @@ define([
// Common.UI.Menu.prototype.onAfterKeydownMenu.call(menu, e);
var
li
;
if
(
arguments
.
length
>
1
&&
arguments
[
1
]
instanceof
jQuery
.
Event
)
// when typing in cell editor
if
(
arguments
.
length
>
1
&&
arguments
[
1
]
instanceof
Keyboard
Event
)
// when typing in cell editor
e
=
arguments
[
1
];
if
(
menuContainer
.
hasClass
(
'
open
'
))
{
if
(
e
.
keyCode
==
Common
.
UI
.
Keys
.
TAB
||
e
.
keyCode
==
Common
.
UI
.
Keys
.
RETURN
&&
!
e
.
ctrlKey
&&
!
e
.
altKey
)
...
...
@@ -1505,6 +1505,7 @@ define([
}
if
(
infocus
)
me
.
cellEditor
.
focus
();
menu
.
cmpEl
.
toggleClass
(
'
from-cell-edit
'
,
infocus
);
_
.
delay
(
function
()
{
menu
.
cmpEl
.
find
(
'
li:first a
'
).
addClass
(
'
focus
'
);
},
10
);
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
6232f19d
...
...
@@ -199,9 +199,11 @@ define([
},
'
menu:show
'
:
function
(
e
){
},
'
menu:hide
'
:
function
(
e
){
if
(
!
me
.
isModalShowed
)
'
menu:hide
'
:
function
(
menu
){
if
(
!
me
.
isModalShowed
&&
(
!
menu
||
!
menu
.
cmpEl
.
hasClass
(
'
from-cell-edit
'
)))
{
me
.
api
.
asc_InputClearKeyboardElement
();
me
.
api
.
asc_enableKeyEvents
(
true
);
}
},
'
edit:complete
'
:
_
.
bind
(
this
.
onEditComplete
,
this
),
'
settings:unitschanged
'
:
_
.
bind
(
this
.
unitsChanged
,
this
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment