From 7e37c9512116134dccf01620289888a252b3016f Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Thu, 4 Feb 2016 11:28:33 -0800 Subject: [PATCH] Release v1.5.8 --- bower.json | 2 +- dist/clipboard.js | 10 +++++++++- dist/clipboard.min.js | 4 ++-- package.js | 2 +- package.json | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index a1c3e29..93937a4 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "clipboard", - "version": "1.5.7", + "version": "1.5.8", "description": "Modern copy to clipboard. No Flash. Just 2kb", "license": "MIT", "main": "dist/clipboard.js", diff --git a/dist/clipboard.js b/dist/clipboard.js index fc442bb..24dbac6 100644 --- a/dist/clipboard.js +++ b/dist/clipboard.js @@ -1,5 +1,5 @@ /*! - * clipboard.js v1.5.7 + * clipboard.js v1.5.8 * https://zenorocha.github.io/clipboard.js * * Licensed MIT © Zeno Rocha @@ -432,8 +432,16 @@ var ClipboardAction = (function () { }); this.fakeElem = document.createElement('textarea'); + // Prevent zooming on iOS + this.fakeElem.style.fontSize = '12pt'; + // Reset box model + this.fakeElem.style.border = '0'; + this.fakeElem.style.padding = '0'; + this.fakeElem.style.margin = '0'; + // Move element out of screen horizontally this.fakeElem.style.position = 'absolute'; this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; + // Move element to the same position vertically this.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px'; this.fakeElem.setAttribute('readonly', ''); this.fakeElem.value = this.text; diff --git a/dist/clipboard.min.js b/dist/clipboard.min.js index 5b0581d..15210c8 100644 --- a/dist/clipboard.min.js +++ b/dist/clipboard.min.js @@ -1,7 +1,7 @@ /*! - * clipboard.js v1.5.7 + * clipboard.js v1.5.8 * https://zenorocha.github.io/clipboard.js * * Licensed MIT © Zeno Rocha */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,r){function o(a,c){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!c&&s)return s(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ar;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;a>i;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},e.exports=r},{}],8:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(t,e){for(var n=0;nr;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;a>i;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},e.exports=r},{}],8:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n