Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
b54c0b5d
Unverified
Commit
b54c0b5d
authored
Aug 24, 2020
by
kay delaney
Committed by
GitHub
Aug 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI/ClickOutsideWrapper: Fix for undesirable timepicker behavior (#27164)
parent
1778e9f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
packages/grafana-ui/src/components/ClickOutsideWrapper/ClickOutsideWrapper.tsx
+4
-5
No files found.
packages/grafana-ui/src/components/ClickOutsideWrapper/ClickOutsideWrapper.tsx
View file @
b54c0b5d
...
@@ -25,17 +25,16 @@ export class ClickOutsideWrapper extends PureComponent<Props, State> {
...
@@ -25,17 +25,16 @@ export class ClickOutsideWrapper extends PureComponent<Props, State> {
};
};
componentDidMount
()
{
componentDidMount
()
{
document
.
addEventListener
(
'
click
'
,
this
.
onOutsideClick
,
false
);
document
.
addEventListener
(
'
mousedown
'
,
this
.
onOutsideClick
,
false
);
if
(
this
.
props
.
includeButtonPress
)
{
if
(
this
.
props
.
includeButtonPress
)
{
// Use keyup since keydown already has an eventlistener on window
document
.
addEventListener
(
'keydown'
,
this
.
onOutsideClick
,
false
);
document
.
addEventListener
(
'keyup'
,
this
.
onOutsideClick
,
false
);
}
}
}
}
componentWillUnmount
()
{
componentWillUnmount
()
{
document
.
removeEventListener
(
'
click
'
,
this
.
onOutsideClick
,
false
);
document
.
removeEventListener
(
'
mousedown
'
,
this
.
onOutsideClick
,
false
);
if
(
this
.
props
.
includeButtonPress
)
{
if
(
this
.
props
.
includeButtonPress
)
{
document
.
removeEventListener
(
'key
up
'
,
this
.
onOutsideClick
,
false
);
document
.
removeEventListener
(
'key
down
'
,
this
.
onOutsideClick
,
false
);
}
}
}
}
...
...
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