Skip to content

Commit

Permalink
Prevent sorting services by clicking in the tab bar background
Browse files Browse the repository at this point in the history
  • Loading branch information
jescobar committed Nov 18, 2017
1 parent b1899be commit 86413ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/services/tabs/Tabbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export default class TabBar extends Component {
reorder({ oldIndex, newIndex });
};

shouldPreventSorting = event => event.target.tagName !== 'LI';

toggleService = ({ serviceId, isEnabled }) => {
const { updateService } = this.props;

Expand Down Expand Up @@ -71,6 +73,7 @@ export default class TabBar extends Component {
setActive={setActive}
onSortEnd={this.onSortEnd}
onSortStart={disableToolTip}
shouldCancelStart={this.shouldPreventSorting}
reload={reload}
toggleNotifications={toggleNotifications}
toggleAudio={toggleAudio}
Expand Down

0 comments on commit 86413ba

Please sign in to comment.