Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Enes Tasbasi
whats-open-web
Commits
264b27c9
Commit
264b27c9
authored
Oct 02, 2019
by
Matthew J Endries
Browse files
Fixed clicking fav button propagating
parent
ad609e70
Changes
1
Show whitespace changes
Inline
Side-by-side
src/components/FavoriteButton.tsx
View file @
264b27c9
...
@@ -18,6 +18,7 @@ class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButton
...
@@ -18,6 +18,7 @@ class FavoriteButton extends React.Component<FavoriteButtonProps, FavoriteButton
handleClick
=
(
event
:
React
.
MouseEvent
)
=>
{
handleClick
=
(
event
:
React
.
MouseEvent
)
=>
{
event
.
stopPropagation
();
// Stops the card from being selected in the sidebar.
event
.
stopPropagation
();
// Stops the card from being selected in the sidebar.
event
.
preventDefault
();
// Also stops the card from being selected in the sidebar.
const
newState
=
!
this
.
state
.
isFavorite
;
const
newState
=
!
this
.
state
.
isFavorite
;
...
...
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