vendor/assets/javascripts/clipboard.js in clipboard-rails-1.4.0 vs vendor/assets/javascripts/clipboard.js in clipboard-rails-1.4.1
- old
+ new
@@ -139,16 +139,16 @@
el[unbind](prefix + type, fn, capture || false);
return fn;
};
},{}],5:[function(require,module,exports){
function E () {
- // Keep this empty so it's easier to inherit from
+ // Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
}
E.prototype = {
- on: function (name, callback, ctx) {
+ on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx
@@ -279,10 +279,10 @@
});
this.fakeElem = document.createElement('textarea');
this.fakeElem.style.position = 'absolute';
this.fakeElem.style.left = '-9999px';
- this.fakeElem.style.top = document.body.scrollTop + 'px';
+ this.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px';
this.fakeElem.setAttribute('readonly', '');
this.fakeElem.value = this.text;
this.selectedText = this.text;
document.body.appendChild(this.fakeElem);
\ No newline at end of file