Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
45815504
Commit
45815504
authored
Jan 16, 2018
by
FuryBean
Committed by
杨奕
Jan 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Popover: fix popover hiding unexpectedly due to accessibility events (#9294)
parent
6ce4b313
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
packages/popover/src/main.vue
packages/popover/src/main.vue
+13
-8
packages/theme-chalk/src/popover.scss
packages/theme-chalk/src/popover.scss
+4
-0
No files found.
packages/popover/src/main.vue
View file @
45815504
...
...
@@ -77,9 +77,14 @@ export default {
addClass
(
reference
,
'
el-popover__reference
'
);
reference
.
setAttribute
(
'
aria-describedby
'
,
this
.
tooltipId
);
reference
.
setAttribute
(
'
tabindex
'
,
0
);
// tab序列
popper
.
setAttribute
(
'
tabindex
'
,
0
);
this
.
trigger
!==
'
click
'
&&
on
(
reference
,
'
focus
'
,
this
.
handleFocus
);
this
.
trigger
!==
'
click
'
&&
on
(
reference
,
'
blur
'
,
this
.
handleBlur
);
if
(
this
.
trigger
!==
'
click
'
)
{
on
(
reference
,
'
focusin
'
,
this
.
handleFocus
);
on
(
popper
,
'
focusin
'
,
this
.
handleFocus
);
on
(
reference
,
'
focusout
'
,
this
.
handleBlur
);
on
(
popper
,
'
focusout
'
,
this
.
handleBlur
);
}
on
(
reference
,
'
keydown
'
,
this
.
handleKeydown
);
on
(
reference
,
'
click
'
,
this
.
handleClick
);
}
...
...
@@ -100,8 +105,8 @@ export default {
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
if
(
children
[
i
].
nodeName
===
'
INPUT
'
||
children
[
i
].
nodeName
===
'
TEXTAREA
'
)
{
on
(
children
[
i
],
'
focus
'
,
this
.
doShow
);
on
(
children
[
i
],
'
blur
'
,
this
.
doClose
);
on
(
children
[
i
],
'
focus
in
'
,
this
.
doShow
);
on
(
children
[
i
],
'
focusout
'
,
this
.
doClose
);
found
=
true
;
break
;
}
...
...
@@ -110,8 +115,8 @@ export default {
if
(
found
)
return
;
if
(
reference
.
nodeName
===
'
INPUT
'
||
reference
.
nodeName
===
'
TEXTAREA
'
)
{
on
(
reference
,
'
focus
'
,
this
.
doShow
);
on
(
reference
,
'
blur
'
,
this
.
doClose
);
on
(
reference
,
'
focus
in
'
,
this
.
doShow
);
on
(
reference
,
'
focusout
'
,
this
.
doClose
);
}
else
{
on
(
reference
,
'
mousedown
'
,
this
.
doShow
);
on
(
reference
,
'
mouseup
'
,
this
.
doClose
);
...
...
@@ -184,8 +189,8 @@ export default {
off
(
reference
,
'
click
'
,
this
.
doToggle
);
off
(
reference
,
'
mouseup
'
,
this
.
doClose
);
off
(
reference
,
'
mousedown
'
,
this
.
doShow
);
off
(
reference
,
'
focus
'
,
this
.
doShow
);
off
(
reference
,
'
blur
'
,
this
.
doClose
);
off
(
reference
,
'
focus
in
'
,
this
.
doShow
);
off
(
reference
,
'
focusout
'
,
this
.
doClose
);
off
(
reference
,
'
mouseleave
'
,
this
.
handleMouseLeave
);
off
(
reference
,
'
mouseenter
'
,
this
.
handleMouseEnter
);
off
(
document
,
'
click
'
,
this
.
handleDocumentClick
);
...
...
packages/theme-chalk/src/popover.scss
View file @
45815504
...
...
@@ -32,4 +32,8 @@
outline-width
:
0
;
}
}
&
:focus:active
,
&
:focus
{
outline-width
:
0
;
}
}
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