Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
2
2015-12-uni-ffm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CmS
2015-12-uni-ffm
Commits
747c4c4b
Commit
747c4c4b
authored
12 years ago
by
Hakim El Hattab
Browse files
Options
Downloads
Patches
Plain Diff
fix keyboard navigation in ie9 (closes #202)
parent
aefe9810
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/reveal.js
+8
-3
8 additions, 3 deletions
js/reveal.js
js/reveal.min.js
+4
-3
4 additions, 3 deletions
js/reveal.min.js
with
12 additions
and
6 deletions
js/reveal.js
+
8
−
3
View file @
747c4c4b
...
...
@@ -1088,9 +1088,14 @@ var Reveal = (function(){
* @param {Object} event
*/
function
onDocumentKeyDown
(
event
)
{
// Disregard the event if the target is editable or a
// modifier is present
if
(
document
.
querySelector
(
'
:focus
'
)
!==
null
||
event
.
shiftKey
||
event
.
altKey
||
event
.
ctrlKey
||
event
.
metaKey
)
return
;
// Check if there's a focused element that could be using
// the keyboard
var
activeElement
=
document
.
activeElement
;
var
hasFocus
=
!!
(
document
.
activeElement
&&
(
document
.
activeElement
.
type
||
document
.
activeElement
.
href
||
document
.
activeElement
.
contentEditable
!==
'
inherit
'
)
);
// Disregard the event if there's a focused element or a
// keyboard modifier key is present
if
(
hasFocus
||
event
.
shiftKey
||
event
.
altKey
||
event
.
ctrlKey
||
event
.
metaKey
)
return
;
var
triggered
=
true
;
...
...
This diff is collapsed.
Click to expand it.
js/reveal.min.js
+
4
−
3
View file @
747c4c4b
...
...
@@ -64,10 +64,11 @@ if(am.length){am[am.length-1].classList.remove("visible");r("fragmenthidden",{fr
if
(
al
.
length
){
al
[
al
.
length
-
1
].
classList
.
remove
(
"
visible
"
);
r
(
"
fragmenthidden
"
,{
fragment
:
al
[
al
.
length
-
1
]});
return
true
;}}
return
false
;}
function
O
(){
clearTimeout
(
k
);
if
(
Y
){
k
=
setTimeout
(
x
,
Y
);}}
function
B
(){
if
(
L
()
||
Q
()
===
false
){
a
(
m
-
1
,
0
);}}
function
j
(){
if
(
L
()
||
v
()
===
false
){
a
(
m
+
1
,
0
);}}
function
u
(){
if
(
L
()
||
Q
()
===
false
){
a
(
m
,
e
-
1
);
}}
function
F
(){
if
(
L
()
||
v
()
===
false
){
a
(
m
,
e
+
1
);}}
function
Z
(){
if
(
Q
()
===
false
){
if
(
g
().
up
){
u
();}
else
{
var
al
=
document
.
querySelector
(
"
.reveal .slides>section.past:nth-child(
"
+
m
+
"
)
"
);
if
(
al
){
e
=
(
al
.
querySelectorAll
(
"
section
"
).
length
+
1
)
||
0
;
m
--
;
a
();}}}}
function
x
(){
if
(
v
()
===
false
){
g
().
down
?
F
():
j
();}
O
();}
function
ah
(
am
){
if
(
document
.
querySelector
(
"
:focus
"
)
!==
null
||
am
.
shiftKey
||
am
.
altKey
||
am
.
ctrlKey
||
am
.
metaKey
){
return
;
}
var
al
=
true
;
switch
(
am
.
keyCode
){
case
80
:
case
33
:
Z
();
break
;
case
78
:
case
34
:
x
();
break
;
case
72
:
case
37
:
B
();
break
;
case
76
:
case
39
:
j
();
break
;
case
75
:
case
38
:
u
();
if
(
al
){
e
=
(
al
.
querySelectorAll
(
"
section
"
).
length
+
1
)
||
0
;
m
--
;
a
();}}}}
function
x
(){
if
(
v
()
===
false
){
g
().
down
?
F
():
j
();}
O
();}
function
ah
(
an
){
var
am
=
document
.
activeElement
;
var
ao
=!!
(
document
.
activeElement
&&
(
document
.
activeElement
.
type
||
document
.
activeElement
.
href
||
document
.
activeElement
.
contentEditable
!==
"
inherit
"
));
if
(
ao
||
an
.
shiftKey
||
an
.
altKey
||
an
.
ctrlKey
||
an
.
metaKey
){
return
;
}
var
al
=
true
;
switch
(
an
.
keyCode
){
case
80
:
case
33
:
Z
();
break
;
case
78
:
case
34
:
x
();
break
;
case
72
:
case
37
:
B
();
break
;
case
76
:
case
39
:
j
();
break
;
case
75
:
case
38
:
u
();
break
;
case
74
:
case
40
:
F
();
break
;
case
36
:
a
(
0
);
break
;
case
35
:
a
(
Number
.
MAX_VALUE
);
break
;
case
32
:
L
()?
ae
():
x
();
break
;
case
13
:
L
()?
ae
():
al
=
false
;
break
;
case
66
:
case
190
:
aa
();
break
;
case
70
:
ab
();
break
;
default
:
al
=
false
;}
if
(
al
){
a
m
.
preventDefault
();}
else
{
if
(
a
m
.
keyCode
===
27
&&
T
){
X
();
a
m
.
preventDefault
();}}
O
();}
function
A
(
al
){
ac
.
startX
=
al
.
touches
[
0
].
clientX
;
break
;
case
70
:
ab
();
break
;
default
:
al
=
false
;}
if
(
al
){
a
n
.
preventDefault
();}
else
{
if
(
a
n
.
keyCode
===
27
&&
T
){
X
();
a
n
.
preventDefault
();}}
O
();}
function
A
(
al
){
ac
.
startX
=
al
.
touches
[
0
].
clientX
;
ac
.
startY
=
al
.
touches
[
0
].
clientY
;
ac
.
startCount
=
al
.
touches
.
length
;
if
(
al
.
touches
.
length
===
2
&&
R
.
overview
){
ac
.
startSpan
=
S
({
x
:
al
.
touches
[
1
].
clientX
,
y
:
al
.
touches
[
1
].
clientY
},{
x
:
ac
.
startX
,
y
:
ac
.
startY
});
}}
function
af
(
aq
){
if
(
!
ac
.
handled
){
var
ao
=
aq
.
touches
[
0
].
clientX
;
var
an
=
aq
.
touches
[
0
].
clientY
;
if
(
aq
.
touches
.
length
===
2
&&
ac
.
startCount
===
2
&&
R
.
overview
){
var
ap
=
S
({
x
:
aq
.
touches
[
1
].
clientX
,
y
:
aq
.
touches
[
1
].
clientY
},{
x
:
ac
.
startX
,
y
:
ac
.
startY
});
if
(
Math
.
abs
(
ac
.
startSpan
-
ap
)
>
ac
.
threshold
){
ac
.
handled
=
true
;
if
(
ap
<
ac
.
startSpan
){
I
();}
else
{
ae
();}}
aq
.
preventDefault
();}
else
{
if
(
aq
.
touches
.
length
===
1
&&
ac
.
startCount
!==
2
){
var
am
=
ao
-
ac
.
startX
,
al
=
an
-
ac
.
startY
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment