Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Boxiang Sun
gitlab-ce
Commits
f0c60bdc
Commit
f0c60bdc
authored
Aug 07, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `tabindex` attribute support to show BS4 popover on trigger `focus`
parent
f996f7e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/assets/javascripts/vue_shared/components/icon.vue
app/assets/javascripts/vue_shared/components/icon.vue
+7
-0
spec/javascripts/vue_shared/components/icon_spec.js
spec/javascripts/vue_shared/components/icon_spec.js
+5
-0
No files found.
app/assets/javascripts/vue_shared/components/icon.vue
View file @
f0c60bdc
...
@@ -75,6 +75,12 @@ export default {
...
@@ -75,6 +75,12 @@ export default {
required
:
false
,
required
:
false
,
default
:
null
,
default
:
null
,
},
},
tabIndex
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
},
},
computed
:
{
computed
:
{
...
@@ -98,6 +104,7 @@ export default {
...
@@ -98,6 +104,7 @@ export default {
:height=
"height"
:height=
"height"
:x=
"x"
:x=
"x"
:y=
"y"
:y=
"y"
:tabindex=
"tabIndex"
>
>
<use
v-bind=
"
{ 'xlink:href':spriteHref }"/>
<use
v-bind=
"
{ 'xlink:href':spriteHref }"/>
</svg>
</svg>
...
...
spec/javascripts/vue_shared/components/icon_spec.js
View file @
f0c60bdc
...
@@ -13,6 +13,7 @@ describe('Sprite Icon Component', function () {
...
@@ -13,6 +13,7 @@ describe('Sprite Icon Component', function () {
name
:
'
commit
'
,
name
:
'
commit
'
,
size
:
32
,
size
:
32
,
cssClasses
:
'
extraclasses
'
,
cssClasses
:
'
extraclasses
'
,
tabIndex
:
'
0
'
,
});
});
});
});
...
@@ -58,5 +59,9 @@ describe('Sprite Icon Component', function () {
...
@@ -58,5 +59,9 @@ describe('Sprite Icon Component', function () {
it
(
'
`name` validator should return false for existing icons
'
,
()
=>
{
it
(
'
`name` validator should return false for existing icons
'
,
()
=>
{
expect
(
Icon
.
props
.
name
.
validator
(
'
commit
'
)).
toBe
(
true
);
expect
(
Icon
.
props
.
name
.
validator
(
'
commit
'
)).
toBe
(
true
);
});
});
it
(
'
should contain `tabindex` attribute on svg element when `tabIndex` prop is defined
'
,
()
=>
{
expect
(
icon
.
$el
.
getAttribute
(
'
tabindex
'
)).
toBe
(
'
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