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
e6e7be6f
Commit
e6e7be6f
authored
Jul 08, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bugs with focus and keydown events in menus.
parent
1ccae8d3
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
3 additions
and
52 deletions
+3
-52
apps/common/main/lib/controller/Comments.js
apps/common/main/lib/controller/Comments.js
+0
-2
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+0
-10
apps/documenteditor/main/app/controller/Toolbar.js
apps/documenteditor/main/app/controller/Toolbar.js
+0
-1
apps/documenteditor/main/app/view/DocumentHolder.js
apps/documenteditor/main/app/view/DocumentHolder.js
+0
-4
apps/documenteditor/main/app/view/Statusbar.js
apps/documenteditor/main/app/view/Statusbar.js
+0
-2
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+0
-9
apps/presentationeditor/main/app/controller/Toolbar.js
apps/presentationeditor/main/app/controller/Toolbar.js
+0
-1
apps/presentationeditor/main/app/view/DocumentHolder.js
apps/presentationeditor/main/app/view/DocumentHolder.js
+0
-4
apps/presentationeditor/main/app/view/Statusbar.js
apps/presentationeditor/main/app/view/Statusbar.js
+0
-1
apps/spreadsheeteditor/main/app/controller/CellEditor.js
apps/spreadsheeteditor/main/app/controller/CellEditor.js
+0
-1
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+0
-2
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+3
-12
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+0
-2
apps/spreadsheeteditor/main/app/view/Statusbar.js
apps/spreadsheeteditor/main/app/view/Statusbar.js
+0
-1
No files found.
apps/common/main/lib/controller/Comments.js
View file @
e6e7be6f
...
@@ -1079,7 +1079,6 @@ define([
...
@@ -1079,7 +1079,6 @@ define([
if
(
dialog
)
{
if
(
dialog
)
{
if
(
this
.
popoverComments
.
length
)
{
if
(
this
.
popoverComments
.
length
)
{
_
.
delay
(
function
()
{
_
.
delay
(
function
()
{
me
.
api
.
asc_enableKeyEvents
(
false
);
dialog
.
commentsView
.
setFocusToTextBox
();
dialog
.
commentsView
.
setFocusToTextBox
();
},
200
);
},
200
);
return
;
return
;
...
@@ -1234,7 +1233,6 @@ define([
...
@@ -1234,7 +1233,6 @@ define([
var
panel
=
$
(
'
.new-comment-ct
'
,
this
.
view
.
el
);
var
panel
=
$
(
'
.new-comment-ct
'
,
this
.
view
.
el
);
if
(
panel
&&
panel
.
length
)
{
if
(
panel
&&
panel
.
length
)
{
if
(
'
none
'
!==
panel
.
css
(
'
display
'
))
{
if
(
'
none
'
!==
panel
.
css
(
'
display
'
))
{
this
.
api
.
asc_enableKeyEvents
(
false
);
this
.
view
.
txtComment
.
focus
();
this
.
view
.
txtComment
.
focus
();
}
}
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
e6e7be6f
...
@@ -155,18 +155,11 @@ define([
...
@@ -155,18 +155,11 @@ define([
// Syncronize focus with api
// Syncronize focus with api
$
(
document
.
body
).
on
(
'
focus
'
,
'
input, textarea
'
,
function
(
e
)
{
$
(
document
.
body
).
on
(
'
focus
'
,
'
input, textarea
'
,
function
(
e
)
{
if
(
!
/area_id/
.
test
(
e
.
target
.
id
))
{
if
(
!
/area_id/
.
test
(
e
.
target
.
id
))
{
me
.
api
.
asc_enableKeyEvents
(
false
);
if
(
/msg-reply/
.
test
(
e
.
target
.
className
))
if
(
/msg-reply/
.
test
(
e
.
target
.
className
))
me
.
dontCloseDummyComment
=
true
;
me
.
dontCloseDummyComment
=
true
;
}
}
});
});
$
(
"
#editor_sdk
"
).
focus
(
function
(
e
)
{
if
(
!
me
.
isModalShowed
)
{
me
.
api
.
asc_enableKeyEvents
(
true
);
}
});
$
(
document
.
body
).
on
(
'
blur
'
,
'
input, textarea
'
,
function
(
e
)
{
$
(
document
.
body
).
on
(
'
blur
'
,
'
input, textarea
'
,
function
(
e
)
{
if
(
!
me
.
isModalShowed
)
{
if
(
!
me
.
isModalShowed
)
{
/*
/*
...
@@ -207,16 +200,13 @@ define([
...
@@ -207,16 +200,13 @@ define([
},
},
'
settings:unitschanged
'
:
_
.
bind
(
this
.
unitsChanged
,
this
),
'
settings:unitschanged
'
:
_
.
bind
(
this
.
unitsChanged
,
this
),
'
dataview:focus
'
:
function
(
e
){
'
dataview:focus
'
:
function
(
e
){
me
.
api
.
asc_enableKeyEvents
(
false
);
},
},
'
dataview:blur
'
:
function
(
e
){
'
dataview:blur
'
:
function
(
e
){
if
(
!
me
.
isModalShowed
)
{
if
(
!
me
.
isModalShowed
)
{
me
.
api
.
asc_enableKeyEvents
(
true
);
me
.
api
.
asc_enableKeyEvents
(
true
);
me
.
onEditComplete
();
}
}
},
},
'
menu:show
'
:
function
(
e
){
'
menu:show
'
:
function
(
e
){
me
.
api
.
asc_enableKeyEvents
(
false
);
},
},
'
menu:hide
'
:
function
(
e
){
'
menu:hide
'
:
function
(
e
){
if
(
!
me
.
isModalShowed
)
if
(
!
me
.
isModalShowed
)
...
...
apps/documenteditor/main/app/controller/Toolbar.js
View file @
e6e7be6f
...
@@ -1107,7 +1107,6 @@ define([
...
@@ -1107,7 +1107,6 @@ define([
msg
:
this
.
textFontSizeErr
,
msg
:
this
.
textFontSizeErr
,
callback
:
function
()
{
callback
:
function
()
{
_
.
defer
(
function
(
btn
)
{
_
.
defer
(
function
(
btn
)
{
me
.
api
.
asc_enableKeyEvents
(
false
);
$
(
'
input
'
,
combo
.
cmpEl
).
focus
();
$
(
'
input
'
,
combo
.
cmpEl
).
focus
();
})
})
}
}
...
...
apps/documenteditor/main/app/view/DocumentHolder.js
View file @
e6e7be6f
...
@@ -110,9 +110,6 @@ define([
...
@@ -110,9 +110,6 @@ define([
menu
.
alignPosition
();
menu
.
alignPosition
();
}
}
_
.
delay
(
function
()
{
_
.
delay
(
function
()
{
var
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-inputmode
"
);
// only for hieroglyphs mode
if
(
value
!==
null
&&
parseInt
(
value
)
==
1
)
me
.
api
.
asc_enableKeyEvents
(
false
);
menu
.
cmpEl
.
focus
();
menu
.
cmpEl
.
focus
();
},
10
);
},
10
);
...
@@ -1616,7 +1613,6 @@ define([
...
@@ -1616,7 +1613,6 @@ define([
addComment
:
function
(
item
,
e
,
eOpt
){
addComment
:
function
(
item
,
e
,
eOpt
){
if
(
this
.
api
&&
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
)
{
if
(
this
.
api
&&
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
)
{
this
.
suppressEditComplete
=
true
;
this
.
suppressEditComplete
=
true
;
this
.
api
.
asc_enableKeyEvents
(
false
);
var
controller
=
DE
.
getController
(
'
Common.Controllers.Comments
'
);
var
controller
=
DE
.
getController
(
'
Common.Controllers.Comments
'
);
if
(
controller
)
{
if
(
controller
)
{
...
...
apps/documenteditor/main/app/view/Statusbar.js
View file @
e6e7be6f
...
@@ -208,7 +208,6 @@ define([
...
@@ -208,7 +208,6 @@ define([
this
.
btnLanguage
.
cmpEl
.
on
({
this
.
btnLanguage
.
cmpEl
.
on
({
'
show.bs.dropdown
'
:
function
()
{
'
show.bs.dropdown
'
:
function
()
{
_
.
defer
(
function
(){
_
.
defer
(
function
(){
me
.
api
.
asc_enableKeyEvents
(
false
);
me
.
btnLanguage
.
cmpEl
.
find
(
'
ul
'
).
focus
();
me
.
btnLanguage
.
cmpEl
.
find
(
'
ul
'
).
focus
();
},
100
);
},
100
);
},
},
...
@@ -234,7 +233,6 @@ define([
...
@@ -234,7 +233,6 @@ define([
});
});
this
.
cntZoom
.
cmpEl
.
on
(
'
show.bs.dropdown
'
,
function
()
{
this
.
cntZoom
.
cmpEl
.
on
(
'
show.bs.dropdown
'
,
function
()
{
_
.
defer
(
function
(){
_
.
defer
(
function
(){
me
.
api
.
asc_enableKeyEvents
(
false
);
me
.
cntZoom
.
cmpEl
.
find
(
'
ul
'
).
focus
();
me
.
cntZoom
.
cmpEl
.
find
(
'
ul
'
).
focus
();
},
100
);
},
100
);
}
}
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
e6e7be6f
...
@@ -138,17 +138,11 @@ define([
...
@@ -138,17 +138,11 @@ define([
// Syncronize focus with api
// Syncronize focus with api
$
(
document
.
body
).
on
(
'
focus
'
,
'
input, textarea
'
,
function
(
e
)
{
$
(
document
.
body
).
on
(
'
focus
'
,
'
input, textarea
'
,
function
(
e
)
{
if
(
!
/area_id/
.
test
(
e
.
target
.
id
))
{
if
(
!
/area_id/
.
test
(
e
.
target
.
id
))
{
me
.
api
.
asc_enableKeyEvents
(
false
);
if
(
/msg-reply/
.
test
(
e
.
target
.
className
))
if
(
/msg-reply/
.
test
(
e
.
target
.
className
))
me
.
dontCloseDummyComment
=
true
;
me
.
dontCloseDummyComment
=
true
;
}
}
});
});
$
(
"
#editor_sdk
"
).
focus
(
function
(
e
)
{
if
(
!
me
.
isModalShowed
)
me
.
api
.
asc_enableKeyEvents
(
true
);
});
$
(
document
.
body
).
on
(
'
blur
'
,
'
input, textarea
'
,
function
(
e
)
{
$
(
document
.
body
).
on
(
'
blur
'
,
'
input, textarea
'
,
function
(
e
)
{
if
(
!
me
.
isModalShowed
)
{
if
(
!
me
.
isModalShowed
)
{
/*
/*
...
@@ -189,16 +183,13 @@ define([
...
@@ -189,16 +183,13 @@ define([
},
},
'
settings:unitschanged
'
:
_
.
bind
(
this
.
unitsChanged
,
this
),
'
settings:unitschanged
'
:
_
.
bind
(
this
.
unitsChanged
,
this
),
'
dataview:focus
'
:
function
(
e
){
'
dataview:focus
'
:
function
(
e
){
me
.
api
.
asc_enableKeyEvents
(
false
);
},
},
'
dataview:blur
'
:
function
(
e
){
'
dataview:blur
'
:
function
(
e
){
if
(
!
me
.
isModalShowed
)
{
if
(
!
me
.
isModalShowed
)
{
me
.
api
.
asc_enableKeyEvents
(
true
);
me
.
api
.
asc_enableKeyEvents
(
true
);
me
.
onEditComplete
();
}
}
},
},
'
menu:show
'
:
function
(
e
){
'
menu:show
'
:
function
(
e
){
me
.
api
.
asc_enableKeyEvents
(
false
);
},
},
'
menu:hide
'
:
function
(
e
){
'
menu:hide
'
:
function
(
e
){
if
(
!
me
.
isModalShowed
)
if
(
!
me
.
isModalShowed
)
...
...
apps/presentationeditor/main/app/controller/Toolbar.js
View file @
e6e7be6f
...
@@ -1106,7 +1106,6 @@ define([
...
@@ -1106,7 +1106,6 @@ define([
msg
:
this
.
textFontSizeErr
,
msg
:
this
.
textFontSizeErr
,
callback
:
function
()
{
callback
:
function
()
{
_
.
defer
(
function
(
btn
)
{
_
.
defer
(
function
(
btn
)
{
me
.
api
.
asc_enableKeyEvents
(
false
);
$
(
'
input
'
,
combo
.
cmpEl
).
focus
();
$
(
'
input
'
,
combo
.
cmpEl
).
focus
();
})
})
}
}
...
...
apps/presentationeditor/main/app/view/DocumentHolder.js
View file @
e6e7be6f
...
@@ -101,9 +101,6 @@ define([
...
@@ -101,9 +101,6 @@ define([
menu
.
alignPosition
();
menu
.
alignPosition
();
}
}
_
.
delay
(
function
()
{
_
.
delay
(
function
()
{
var
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-inputmode
"
);
// only for hieroglyphs mode
if
(
value
!==
null
&&
parseInt
(
value
)
==
1
)
me
.
api
.
asc_enableKeyEvents
(
false
);
menu
.
cmpEl
.
focus
();
menu
.
cmpEl
.
focus
();
},
10
);
},
10
);
...
@@ -813,7 +810,6 @@ define([
...
@@ -813,7 +810,6 @@ define([
addComment
:
function
(
item
,
e
,
eOpt
){
addComment
:
function
(
item
,
e
,
eOpt
){
if
(
this
.
api
&&
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
)
{
if
(
this
.
api
&&
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
isEdit
&&
this
.
mode
.
canComments
)
{
this
.
suppressEditComplete
=
true
;
this
.
suppressEditComplete
=
true
;
this
.
api
.
asc_enableKeyEvents
(
false
);
var
controller
=
PE
.
getController
(
'
Common.Controllers.Comments
'
);
var
controller
=
PE
.
getController
(
'
Common.Controllers.Comments
'
);
if
(
controller
)
{
if
(
controller
)
{
...
...
apps/presentationeditor/main/app/view/Statusbar.js
View file @
e6e7be6f
...
@@ -137,7 +137,6 @@ define([
...
@@ -137,7 +137,6 @@ define([
});
});
this
.
cntZoom
.
cmpEl
.
on
(
'
show.bs.dropdown
'
,
function
()
{
this
.
cntZoom
.
cmpEl
.
on
(
'
show.bs.dropdown
'
,
function
()
{
_
.
defer
(
function
(){
_
.
defer
(
function
(){
me
.
api
.
asc_enableKeyEvents
(
false
);
me
.
cntZoom
.
cmpEl
.
find
(
'
ul
'
).
focus
();
me
.
cntZoom
.
cmpEl
.
find
(
'
ul
'
).
focus
();
},
100
);
},
100
);
}
}
...
...
apps/spreadsheeteditor/main/app/controller/CellEditor.js
View file @
e6e7be6f
...
@@ -217,7 +217,6 @@ define([
...
@@ -217,7 +217,6 @@ define([
var
controller
=
this
.
getApplication
().
getController
(
'
FormulaDialog
'
);
var
controller
=
this
.
getApplication
().
getController
(
'
FormulaDialog
'
);
if
(
controller
)
{
if
(
controller
)
{
$
(
'
#ce-func-label
'
,
this
.
editor
.
el
).
blur
();
$
(
'
#ce-func-label
'
,
this
.
editor
.
el
).
blur
();
this
.
api
.
asc_enableKeyEvents
(
false
);
controller
.
showDialog
();
controller
.
showDialog
();
}
}
}
}
...
...
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
View file @
e6e7be6f
...
@@ -419,7 +419,6 @@ define([
...
@@ -419,7 +419,6 @@ define([
onInsFunction
:
function
(
item
)
{
onInsFunction
:
function
(
item
)
{
var
controller
=
this
.
getApplication
().
getController
(
'
FormulaDialog
'
);
var
controller
=
this
.
getApplication
().
getController
(
'
FormulaDialog
'
);
if
(
controller
&&
this
.
api
)
{
if
(
controller
&&
this
.
api
)
{
this
.
api
.
asc_enableKeyEvents
(
false
);
controller
.
showDialog
();
controller
.
showDialog
();
}
}
},
},
...
@@ -517,7 +516,6 @@ define([
...
@@ -517,7 +516,6 @@ define([
onAddComment
:
function
(
item
)
{
onAddComment
:
function
(
item
)
{
if
(
this
.
api
&&
this
.
permissions
.
canCoAuthoring
&&
this
.
permissions
.
isEdit
&&
this
.
permissions
.
canComments
)
{
if
(
this
.
api
&&
this
.
permissions
.
canCoAuthoring
&&
this
.
permissions
.
isEdit
&&
this
.
permissions
.
canComments
)
{
this
.
api
.
asc_enableKeyEvents
(
false
);
var
controller
=
SSE
.
getController
(
'
Common.Controllers.Comments
'
),
var
controller
=
SSE
.
getController
(
'
Common.Controllers.Comments
'
),
cellinfo
=
this
.
api
.
asc_getCellInfo
();
cellinfo
=
this
.
api
.
asc_getCellInfo
();
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
e6e7be6f
...
@@ -156,12 +156,6 @@ define([
...
@@ -156,12 +156,6 @@ define([
}
}
});
});
$
(
"
#editor_sdk
"
).
focus
(
function
(
e
)
{
if
(
this
.
isAppDisabled
===
true
)
return
;
if
(
!
me
.
isModalShowed
)
me
.
api
.
asc_enableKeyEvents
(
true
);
});
$
(
document
.
body
).
on
(
'
blur
'
,
'
input, textarea
'
,
function
(
e
)
{
$
(
document
.
body
).
on
(
'
blur
'
,
'
input, textarea
'
,
function
(
e
)
{
if
(
this
.
isAppDisabled
===
true
)
return
;
if
(
this
.
isAppDisabled
===
true
)
return
;
if
(
!
me
.
isModalShowed
&&
!
(
me
.
loadMask
&&
me
.
loadMask
.
isVisible
())
&&
!
/area_id/
.
test
(
e
.
target
.
id
)
&&
if
(
!
me
.
isModalShowed
&&
!
(
me
.
loadMask
&&
me
.
loadMask
.
isVisible
())
&&
!
/area_id/
.
test
(
e
.
target
.
id
)
&&
...
@@ -197,20 +191,17 @@ define([
...
@@ -197,20 +191,17 @@ define([
}
}
},
},
'
dataview:focus
'
:
function
(
e
){
'
dataview:focus
'
:
function
(
e
){
// me.api.asc_enableKeyEvents(false);
},
},
'
dataview:blur
'
:
function
(
e
){
'
dataview:blur
'
:
function
(
e
){
if
(
!
me
.
isModalShowed
)
{
if
(
!
me
.
isModalShowed
)
{
// me.api.asc_enableKeyEvents(true);
me
.
api
.
asc_enableKeyEvents
(
true
);
me
.
onEditComplete
();
}
}
},
},
'
menu:show
'
:
function
(
e
){
'
menu:show
'
:
function
(
e
){
// me.api.asc_enableKeyEvents(false);
},
},
'
menu:hide
'
:
function
(
e
){
'
menu:hide
'
:
function
(
e
){
//
if (!me.isModalShowed)
if
(
!
me
.
isModalShowed
)
//
me.api.asc_enableKeyEvents(true);
me
.
api
.
asc_enableKeyEvents
(
true
);
},
},
'
edit:complete
'
:
_
.
bind
(
this
.
onEditComplete
,
this
),
'
edit:complete
'
:
_
.
bind
(
this
.
onEditComplete
,
this
),
'
settings:unitschanged
'
:
_
.
bind
(
this
.
unitsChanged
,
this
)
'
settings:unitschanged
'
:
_
.
bind
(
this
.
unitsChanged
,
this
)
...
...
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
e6e7be6f
...
@@ -878,7 +878,6 @@ define([
...
@@ -878,7 +878,6 @@ define([
if
(
item
.
value
===
'
more
'
)
{
if
(
item
.
value
===
'
more
'
)
{
var
controller
=
this
.
getApplication
().
getController
(
'
FormulaDialog
'
);
var
controller
=
this
.
getApplication
().
getController
(
'
FormulaDialog
'
);
if
(
controller
)
{
if
(
controller
)
{
this
.
api
.
asc_enableKeyEvents
(
false
);
controller
.
showDialog
();
controller
.
showDialog
();
}
}
}
else
{
}
else
{
...
@@ -1082,7 +1081,6 @@ define([
...
@@ -1082,7 +1081,6 @@ define([
msg
:
this
.
textFontSizeErr
,
msg
:
this
.
textFontSizeErr
,
callback
:
function
()
{
callback
:
function
()
{
_
.
defer
(
function
(
btn
)
{
_
.
defer
(
function
(
btn
)
{
me
.
api
.
asc_enableKeyEvents
(
false
);
$
(
'
input
'
,
combo
.
cmpEl
).
focus
();
$
(
'
input
'
,
combo
.
cmpEl
).
focus
();
})
})
}
}
...
...
apps/spreadsheeteditor/main/app/view/Statusbar.js
View file @
e6e7be6f
...
@@ -150,7 +150,6 @@ define([
...
@@ -150,7 +150,6 @@ define([
this
.
cntZoom
.
cmpEl
.
on
({
this
.
cntZoom
.
cmpEl
.
on
({
'
show.bs.dropdown
'
:
function
()
{
'
show.bs.dropdown
'
:
function
()
{
_
.
defer
(
function
(){
_
.
defer
(
function
(){
me
.
api
.
asc_enableKeyEvents
(
false
);
me
.
cntZoom
.
cmpEl
.
find
(
'
ul
'
).
focus
();
me
.
cntZoom
.
cmpEl
.
find
(
'
ul
'
).
focus
();
},
100
);
},
100
);
},
},
...
...
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