Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit eecf43f

Browse files
committedDec 6, 2015
Merge branch '4screens-master'
2 parents 9de7662 + 7c6153f commit eecf43f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎js/utils/tap.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ ionic.tap = {
170170
(ele.tagName == 'INPUT' && (/^(date|time|datetime-local|month|week)$/i).test(ele.type));
171171
},
172172

173+
isVideo: function(ele) {
174+
return !!ele &&
175+
(ele.tagName == 'VIDEO');
176+
},
177+
173178
isKeyboardElement: function(ele) {
174179
if ( !ionic.Platform.isIOS() || ionic.Platform.isIPad() ) {
175180
return ionic.tap.isTextInput(ele) && !ionic.tap.isDateInput(ele);
@@ -356,11 +361,13 @@ function tapMouseDown(e) {
356361
console.log('mousedown', 'stop event');
357362
e.stopPropagation();
358363

359-
if ((!ionic.tap.isTextInput(e.target) || tapLastTouchTarget !== e.target) && !isSelectOrOption(e.target.tagName)) {
364+
if ((!ionic.tap.isTextInput(e.target) || tapLastTouchTarget !== e.target) && !isSelectOrOption(e.target.tagName) && !ionic.tap.isVideo(e.target)) {
360365
// If you preventDefault on a text input then you cannot move its text caret/cursor.
361366
// Allow through only the text input default. However, without preventDefault on an
362367
// input the 300ms delay can change focus on inputs after the keyboard shows up.
363368
// The focusin event handles the chance of focus changing after the keyboard shows.
369+
// Windows Phone - if you preventDefault on a video element then you cannot operate
370+
// its native controls.
364371
e.preventDefault();
365372
}
366373

0 commit comments

Comments
 (0)
Please sign in to comment.