mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Merge pull request #479 from J3QQ4/patch-1
Fix bug: scrolling time div on touchscreens
This commit is contained in:
commit
428499aad2
@ -593,6 +593,9 @@ var DateFormatter;
|
||||
}
|
||||
}(function ($) {
|
||||
'use strict';
|
||||
|
||||
var currentlyScrollingTimeDiv = false;
|
||||
|
||||
var default_options = {
|
||||
i18n: {
|
||||
ar: { // Arabic
|
||||
@ -2410,8 +2413,13 @@ var DateFormatter;
|
||||
});
|
||||
|
||||
timebox
|
||||
.on('touchmove', 'div', function () { currentlyScrollingTimeDiv = true; })
|
||||
.on('touchend click.xdsoft', 'div', function (xdevent) {
|
||||
xdevent.stopPropagation();
|
||||
if (currentlyScrollingTimeDiv) {
|
||||
currentlyScrollingTimeDiv = false;
|
||||
return;
|
||||
}
|
||||
var $this = $(this),
|
||||
currentTime = _xdsoft_datetime.currentTime;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user