Skip to content

Commit

Permalink
Merging 4.2.3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dioslaska committed May 15, 2018
1 parent 36a7f2c commit c61f6c6
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobiscroll",
"version": "4.2.1",
"version": "4.2.3",
"description": "Cross platform UI controls for progressive web an hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/angular-lite",
"version": "4.2.1",
"version": "4.2.3",
"description": "Angular UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/angularjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/angularjs-lite",
"version": "4.2.1",
"version": "4.2.3",
"description": "AngularJS UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/javascript-lite",
"version": "4.2.1",
"version": "4.2.3",
"description": "Framework agnostic UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jquery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/jquery-lite",
"version": "4.2.1",
"version": "4.2.3",
"description": "jQuery and jQuery Mobile UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/react-lite",
"version": "4.2.1",
"version": "4.2.3",
"description": "React UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
46 changes: 32 additions & 14 deletions src/js/classes/frame.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { $, extend, Base, mobiscroll, classes, instances } from '../core/core';
import { os, majorVersion, isBrowser, userAgent } from '../util/platform';
import { animEnd } from '../util/dom';
import { getCoord, preventClick } from '../util/tap';
import { constrain, isString, noop } from '../util/misc';

var $activeElm,
Expand Down Expand Up @@ -816,20 +817,37 @@ export const Frame = function (el, settings, inherit) {
}

if (s.closeOnOverlayTap) {
var target;

$overlay.on('touchstart mousedown', function (ev) {
target = ev.target == overlay;
}).on('mouseup', function (ev) {
target = target && ev.target == overlay;
});

that.tap(overlay, function (ev) {
if (target && ev.target == overlay) {
that.cancel();
}
target = false;
});
var moved,
target,
startX,
startY;

$overlay
.on('touchstart mousedown', function (ev) {
if (!target && ev.target == overlay) {
target = true;
moved = false;
startX = getCoord(ev, 'X');
startY = getCoord(ev, 'Y');
}
})
.on('touchmove mousemove', function (ev) {
if (target && !moved && (Math.abs(getCoord(ev, 'X') - startX) > 9 || Math.abs(getCoord(ev, 'Y') - startY) > 9)) {
moved = true;
}
})
.on('touchcancel', function () {
target = false;
})
.on('touchend click', function (ev) {
if (target && !moved) {
that.cancel();
if (ev.type == 'touchend') {
preventClick();
}
}
target = false;
});
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/js/core/core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Mobiscroll v4.2.2
* Mobiscroll v4.2.3
* http://mobiscroll.com
*
* Copyright 2010-2018, Acid Media
Expand Down Expand Up @@ -69,7 +69,7 @@ extend(util, {

ms = extend(mobiscroll, {
$: $,
version: '4.2.2',
version: '4.2.3',
autoTheme: 'mobiscroll',
themes: {
form: {},
Expand Down

0 comments on commit c61f6c6

Please sign in to comment.