Permalink
Browse files

Tweaking file clickjacking for IE

  • Loading branch information...
Jake Archibald
Jake Archibald committed Jul 25, 2011
1 parent 6edb6f0 commit f747e750df94978c176d850d33cd9dc87c41b18a
Showing with 3 additions and 1 deletion.
  1. +3 −1 www/assets/3/script/jquery.fileClickjack.js
@@ -31,6 +31,8 @@
return this; return this;
} }
var fileInputWidth = $fileInput.width();
this.each(function() { this.each(function() {
var $this = $(this), var $this = $(this),
thisOffset, thisOffset,
@@ -71,7 +73,7 @@
targetOffset = $fileInput.offset(), targetOffset = $fileInput.offset(),
newPos = { newPos = {
top: targetPos.top - (targetOffset.top - pageY) - 5, top: targetPos.top - (targetOffset.top - pageY) - 5,
left: targetPos.left - (targetOffset.left - pageX) - 5 left: targetPos.left - (targetOffset.left - pageX) - fileInputWidth + 5
}; };
$fileInput.css( newPos ); $fileInput.css( newPos );

0 comments on commit f747e75

Please sign in to comment.