Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
don't pass mouse event as frameProps
Browse files Browse the repository at this point in the history
fixes #2708
auditors: @bbondy
  • Loading branch information
bridiver committed Jul 28, 2016
1 parent 6b0d144 commit cb3c161
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/components/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ class Tabs extends ImmutableComponent {
}
}

newTab () {
windowActions.newFrame()
}

render () {
this.tabRefs = []
return <div className='tabs'>
Expand Down Expand Up @@ -131,7 +135,7 @@ class Tabs extends ImmutableComponent {
<Button label='+'
l10nId='newTabButton'
className='navbutton newFrameButton'
onClick={windowActions.newFrame} />
onClick={this.newTab} />

This comment has been minimized.

Copy link
@bbondy

bbondy Jul 28, 2016

Member

we should add a function in js/lib/functional.js that will wrap a function and suppress any args if passed to it when called. Maybe called suppressArgs?

This comment has been minimized.

Copy link
@bbondy

bbondy Jul 28, 2016

Member

then it would be onClick={suppressArgs(windowActions.newFrame)}

This comment has been minimized.

Copy link
@luixxiul

luixxiul Jul 28, 2016

Contributor

@bridiver: please ping me too when this is added, thanks.

</span>
</div>
}
Expand Down

1 comment on commit cb3c161

@bbondy
Copy link
Member

@bbondy bbondy commented on cb3c161 Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ though

Please sign in to comment.