Skip to content

Commit

Permalink
Prevent dropdown default event from propigating. steemit#154
Browse files Browse the repository at this point in the history
  • Loading branch information
James Calfee committed Aug 31, 2016
1 parent 8c5fe43 commit 6db0b32
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/components/elements/VerticalMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class VerticalMenu extends React.Component {
hideValue: React.PropTypes.string,
};

closeMenu = (e) => {
closeMenu = () => {
document.body.click();
}

Expand Down
9 changes: 6 additions & 3 deletions app/components/modules/BlocktradesDeposit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,12 @@ export default class BlocktradesDeposit extends React.Component {
</span>

const coin_menu = [
{onClick: () => inputCoin.onChange('ETH'), value: 'Ether', icon: 'ether', link: '#'},
{onClick: () => inputCoin.onChange('BTC'), value: 'Bitcoin', icon: 'bitcoin', link: '#'},
{onClick: () => inputCoin.onChange('BTS'), value: 'Bitshares', icon: 'bitshares', link: '#'},
{onClick: (e) => {e.preventDefault(); inputCoin.onChange('ETH')},
value: 'Ether', icon: 'ether', link: '#'},
{onClick: (e) => {e.preventDefault(); inputCoin.onChange('BTC')},
value: 'Bitcoin', icon: 'bitcoin', link: '#'},
{onClick: (e) => {e.preventDefault(); inputCoin.onChange('BTS')},
value: 'Bitshares', icon: 'bitshares', link: '#'},
];
const selectInputCoin = <DropdownMenu className="move-left" items={coin_menu} selected={coinName(inputCoin.value)} el="span" />
const estimateButtonLabel = est.inputAmount != null ? 'Update Estimate' : 'Get Estimate'
Expand Down
6 changes: 4 additions & 2 deletions app/components/modules/UserWallet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ class UserWallet extends React.Component {
super()
this.state = {}
this.onShowDeposit = () => {this.setState({showDeposit: !this.state.showDeposit})}
this.onShowDepositSteem = () => {
this.onShowDepositSteem = (e) => {
e.preventDefault()
this.setState({showDeposit: !this.state.showDeposit, depositType: 'STEEM'})
}
this.onShowDepositPower = () => {
this.onShowDepositPower = (e) => {
e.preventDefault()
this.setState({showDeposit: !this.state.showDeposit, depositType: 'VESTS'})
}
// this.onShowDeposit = this.onShowDeposit.bind(this)
Expand Down

0 comments on commit 6db0b32

Please sign in to comment.