Skip to content
Snippets Groups Projects
Unverified Commit 6928da96 authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #1732 from paulkaplan/fix-touch-tabs

Manually fire tab change events onclick to fix touching tabs not working
parents ef550b7b 4cd58dc2
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,8 @@ const GUIComponent = props => { ...@@ -53,6 +53,8 @@ const GUIComponent = props => {
intl, intl,
loading, loading,
onExtensionButtonClick, onExtensionButtonClick,
onActivateCostumesTab,
onActivateSoundsTab,
onActivateTab, onActivateTab,
previewInfoVisible, previewInfoVisible,
soundsTabVisible, soundsTabVisible,
...@@ -124,7 +126,10 @@ const GUIComponent = props => { ...@@ -124,7 +126,10 @@ const GUIComponent = props => {
id="gui.gui.codeTab" id="gui.gui.codeTab"
/> />
</Tab> </Tab>
<Tab className={tabClassNames.tab}> <Tab
className={tabClassNames.tab}
onClick={onActivateCostumesTab}
>
<img <img
draggable={false} draggable={false}
src={costumesIcon} src={costumesIcon}
...@@ -135,7 +140,10 @@ const GUIComponent = props => { ...@@ -135,7 +140,10 @@ const GUIComponent = props => {
id="gui.gui.costumesTab" id="gui.gui.costumesTab"
/> />
</Tab> </Tab>
<Tab className={tabClassNames.tab}> <Tab
className={tabClassNames.tab}
onClick={onActivateSoundsTab}
>
<img <img
draggable={false} draggable={false}
src={soundsIcon} src={soundsIcon}
...@@ -220,6 +228,8 @@ GUIComponent.propTypes = { ...@@ -220,6 +228,8 @@ GUIComponent.propTypes = {
importInfoVisible: PropTypes.bool, importInfoVisible: PropTypes.bool,
intl: intlShape.isRequired, intl: intlShape.isRequired,
loading: PropTypes.bool, loading: PropTypes.bool,
onActivateCostumesTab: PropTypes.func,
onActivateSoundsTab: PropTypes.func,
onActivateTab: PropTypes.func, onActivateTab: PropTypes.func,
onExtensionButtonClick: PropTypes.func, onExtensionButtonClick: PropTypes.func,
onTabSelect: PropTypes.func, onTabSelect: PropTypes.func,
......
...@@ -107,7 +107,9 @@ const mapStateToProps = state => ({ ...@@ -107,7 +107,9 @@ const mapStateToProps = state => ({
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = dispatch => ({
onExtensionButtonClick: () => dispatch(openExtensionLibrary()), onExtensionButtonClick: () => dispatch(openExtensionLibrary()),
onActivateTab: tab => dispatch(activateTab(tab)) onActivateTab: tab => dispatch(activateTab(tab)),
onActivateCostumesTab: () => dispatch(activateTab(COSTUMES_TAB_INDEX)),
onActivateSoundsTab: () => dispatch(activateTab(SOUNDS_TAB_INDEX))
}); });
const ConnectedGUI = connect( const ConnectedGUI = connect(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment