New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vkontakte/mvk-mini-apps-scroll-helper

Package Overview
Dependencies
Maintainers
13
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vkontakte/mvk-mini-apps-scroll-helper - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

19

dist/mvk-mini-apps-scroll-helper.cjs.js

@@ -6,5 +6,21 @@ 'use strict';

/**
* @returns {array|false}
*/
var iOSVersion = function iOSVersion() {
var match = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
var version = null;
if (match !== undefined && match !== null) {
version = [parseInt(match[1], 10), parseInt(match[2], 10), parseInt(match[3] || 0, 10)];
return version;
}
return false;
};
/**
* @param {HTMLElement|null} appContainerNode
*/
var mvkScrollHelper = function mvkScrollHelper(appContainerNode) {

@@ -18,4 +34,5 @@ if (appContainerNode == null) {

userAgent = _navigator.userAgent;
var version = iOSVersion();
if ((userAgent.indexOf('iPhone') > -1 || userAgent.indexOf('iPad') > -1) && isMobileWeb) {
if ((userAgent.indexOf('iPhone') > -1 || userAgent.indexOf('iPad') > -1) && isMobileWeb && version && version[0] < 13) {
appContainerNode.style.overflowY = 'scroll';

@@ -22,0 +39,0 @@ appContainerNode.style.webkitOverflowScrolling = 'touch';

@@ -10,5 +10,21 @@ (function (global, factory) {

/**
* @returns {array|false}
*/
var iOSVersion = function iOSVersion() {
var match = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
var version = null;
if (match !== undefined && match !== null) {
version = [parseInt(match[1], 10), parseInt(match[2], 10), parseInt(match[3] || 0, 10)];
return version;
}
return false;
};
/**
* @param {HTMLElement|null} appContainerNode
*/
var mvkScrollHelper = function mvkScrollHelper(appContainerNode) {

@@ -22,4 +38,5 @@ if (appContainerNode == null) {

userAgent = _navigator.userAgent;
var version = iOSVersion();
if ((userAgent.indexOf('iPhone') > -1 || userAgent.indexOf('iPad') > -1) && isMobileWeb) {
if ((userAgent.indexOf('iPhone') > -1 || userAgent.indexOf('iPad') > -1) && isMobileWeb && version && version[0] < 13) {
appContainerNode.style.overflowY = 'scroll';

@@ -26,0 +43,0 @@ appContainerNode.style.webkitOverflowScrolling = 'touch';

2

package.json
{
"name": "@vkontakte/mvk-mini-apps-scroll-helper",
"version": "1.1.1",
"version": "1.2.0",
"main": "dist/mvk-mini-apps-scroll-helper.cjs.js",

@@ -5,0 +5,0 @@ "browser": "dist/mvk-mini-apps-scroll-helper.umd.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc