Skip to content

Commit 49de8cf

Browse files
Merge pull request arqex#542 from NicoDos/issue#525
Remove onTouchStart attribute when used together with onMouseDown to Fix Issue arqex#525
2 parents d40f6d8 + 26446a9 commit 49de8cf

File tree

2 files changed

+16
-28
lines changed

2 files changed

+16
-28
lines changed

src/TimeView.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ var DateTimePickerTime = onClickOutside( createClass({
5959
}
6060
}
6161
return React.createElement('div', { key: type, className: 'rdtCounter' }, [
62-
React.createElement('span', { key: 'up', className: 'rdtBtn', onTouchStart: this.onStartClicking('increase', type), onMouseDown: this.onStartClicking( 'increase', type ), onContextMenu: this.disableContextMenu }, '▲' ),
62+
React.createElement('span', { key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'increase', type ), onContextMenu: this.disableContextMenu }, '▲' ),
6363
React.createElement('div', { key: 'c', className: 'rdtCount' }, value ),
64-
React.createElement('span', { key: 'do', className: 'rdtBtn', onTouchStart: this.onStartClicking('decrease', type), onMouseDown: this.onStartClicking( 'decrease', type ), onContextMenu: this.disableContextMenu }, '▼' )
64+
React.createElement('span', { key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'decrease', type ), onContextMenu: this.disableContextMenu }, '▼' )
6565
]);
6666
}
6767
return '';
6868
},
6969

7070
renderDayPart: function() {
7171
return React.createElement('div', { key: 'dayPart', className: 'rdtCounter' }, [
72-
React.createElement('span', { key: 'up', className: 'rdtBtn', onTouchStart: this.onStartClicking('toggleDayPart', 'hours'), onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▲' ),
72+
React.createElement('span', { key: 'up', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▲' ),
7373
React.createElement('div', { key: this.state.daypart, className: 'rdtCount' }, this.state.daypart ),
74-
React.createElement('span', { key: 'do', className: 'rdtBtn', onTouchStart: this.onStartClicking('toggleDayPart', 'hours'), onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▼' )
74+
React.createElement('span', { key: 'do', className: 'rdtBtn', onMouseDown: this.onStartClicking( 'toggleDayPart', 'hours'), onContextMenu: this.disableContextMenu }, '▼' )
7575
]);
7676
},
7777

test/__snapshots__/snapshots.spec.js.snap

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ exports[`dateFormat set to false 1`] = `
2424
<span
2525
className="rdtBtn"
2626
onContextMenu={[Function]}
27-
onMouseDown={[Function]}
28-
onTouchStart={[Function]}>
27+
onMouseDown={[Function]}>
2928
3029
</span>
3130
<div
@@ -35,8 +34,7 @@ exports[`dateFormat set to false 1`] = `
3534
<span
3635
className="rdtBtn"
3736
onContextMenu={[Function]}
38-
onMouseDown={[Function]}
39-
onTouchStart={[Function]}>
37+
onMouseDown={[Function]}>
4038
4139
</span>
4240
</div>
@@ -49,8 +47,7 @@ exports[`dateFormat set to false 1`] = `
4947
<span
5048
className="rdtBtn"
5149
onContextMenu={[Function]}
52-
onMouseDown={[Function]}
53-
onTouchStart={[Function]}>
50+
onMouseDown={[Function]}>
5451
5552
</span>
5653
<div
@@ -60,8 +57,7 @@ exports[`dateFormat set to false 1`] = `
6057
<span
6158
className="rdtBtn"
6259
onContextMenu={[Function]}
63-
onMouseDown={[Function]}
64-
onTouchStart={[Function]}>
60+
onMouseDown={[Function]}>
6561
6662
</span>
6763
</div>
@@ -70,8 +66,7 @@ exports[`dateFormat set to false 1`] = `
7066
<span
7167
className="rdtBtn"
7268
onContextMenu={[Function]}
73-
onMouseDown={[Function]}
74-
onTouchStart={[Function]}>
69+
onMouseDown={[Function]}>
7570
7671
</span>
7772
<div
@@ -81,8 +76,7 @@ exports[`dateFormat set to false 1`] = `
8176
<span
8277
className="rdtBtn"
8378
onContextMenu={[Function]}
84-
onMouseDown={[Function]}
85-
onTouchStart={[Function]}>
79+
onMouseDown={[Function]}>
8680
8781
</span>
8882
</div>
@@ -7635,8 +7629,7 @@ exports[`viewMode set to time 1`] = `
76357629
<span
76367630
className="rdtBtn"
76377631
onContextMenu={[Function]}
7638-
onMouseDown={[Function]}
7639-
onTouchStart={[Function]}>
7632+
onMouseDown={[Function]}>
76407633
76417634
</span>
76427635
<div
@@ -7646,8 +7639,7 @@ exports[`viewMode set to time 1`] = `
76467639
<span
76477640
className="rdtBtn"
76487641
onContextMenu={[Function]}
7649-
onMouseDown={[Function]}
7650-
onTouchStart={[Function]}>
7642+
onMouseDown={[Function]}>
76517643
76527644
</span>
76537645
</div>
@@ -7660,8 +7652,7 @@ exports[`viewMode set to time 1`] = `
76607652
<span
76617653
className="rdtBtn"
76627654
onContextMenu={[Function]}
7663-
onMouseDown={[Function]}
7664-
onTouchStart={[Function]}>
7655+
onMouseDown={[Function]}>
76657656
76667657
</span>
76677658
<div
@@ -7671,8 +7662,7 @@ exports[`viewMode set to time 1`] = `
76717662
<span
76727663
className="rdtBtn"
76737664
onContextMenu={[Function]}
7674-
onMouseDown={[Function]}
7675-
onTouchStart={[Function]}>
7665+
onMouseDown={[Function]}>
76767666
76777667
</span>
76787668
</div>
@@ -7681,8 +7671,7 @@ exports[`viewMode set to time 1`] = `
76817671
<span
76827672
className="rdtBtn"
76837673
onContextMenu={[Function]}
7684-
onMouseDown={[Function]}
7685-
onTouchStart={[Function]}>
7674+
onMouseDown={[Function]}>
76867675
76877676
</span>
76887677
<div
@@ -7692,8 +7681,7 @@ exports[`viewMode set to time 1`] = `
76927681
<span
76937682
className="rdtBtn"
76947683
onContextMenu={[Function]}
7695-
onMouseDown={[Function]}
7696-
onTouchStart={[Function]}>
7684+
onMouseDown={[Function]}>
76977685
76987686
</span>
76997687
</div>

0 commit comments

Comments
 (0)