diff --git a/dist/jquery.fileinput.js b/dist/jquery.fileinput.js index a77e095..c06d4fc 100644 --- a/dist/jquery.fileinput.js +++ b/dist/jquery.fileinput.js @@ -46,14 +46,12 @@ }) }); - element.attr("tabindex", "-1").css({filter: "alpha(opacity=0)", "-moz-opacity": 0, opacity: 0, position: "absolute", "z-index": -1}); + element.css({filter: "alpha(opacity=0)", "-moz-opacity": 0, opacity: 0, position: "absolute", "z-index": -1}); element.before(replacementHtml); element.prev().addClass("fileinput"); if (!$.support.cssPseudoClasses) { element.css({"z-index":"auto", "cursor":"pointer"}); element.prev(".fileinput").css("z-index", -1); - element.removeAttr("tabindex"); - element.prev(".fileinput").attr("tabindex", "-1"); element.hover(function() { $(this).prev(".fileinput").addClass("hover"); }, function() { diff --git a/dist/jquery.fileinput.min.js b/dist/jquery.fileinput.min.js index 475172f..4ee0db9 100644 --- a/dist/jquery.fileinput.min.js +++ b/dist/jquery.fileinput.min.js @@ -6,4 +6,4 @@ * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ -(function(e){e.support.cssPseudoClasses=function(){try{var t=e("").appendTo("body"),i=e('').appendTo("head");i.text("input:checked {width: 200px; display: none}");var n="200px"==t.css("width");return t.remove(),i.remove(),n}catch(s){return!1}}(),e.fn.fileinput=function(t){var i=this,n='';return t&&(n=t instanceof jQuery?e(t).wrap("
").parent().html():t),i.each(function(){var t=e(this);t.wrap(''),t.parent().mousemove(function(t){var i,n,s=e(this);i=s.offset().left,n=s.offset().top,s.find("input").css({left:t.pageX-i-s.find("input[type=file]").width()+30,top:t.pageY-n-10})}),t.attr("tabindex","-1").css({filter:"alpha(opacity=0)","-moz-opacity":0,opacity:0,position:"absolute","z-index":-1}),t.before(n),t.prev().addClass("fileinput"),e.support.cssPseudoClasses?(t.prev(".fileinput").click(function(){t.click()}),t.prev(":submit.fileinput").click(function(e){e.preventDefault()})):(t.css({"z-index":"auto",cursor:"pointer"}),t.prev(".fileinput").css("z-index",-1),t.removeAttr("tabindex"),t.prev(".fileinput").attr("tabindex","-1"),t.hover(function(){e(this).prev(".fileinput").addClass("hover")},function(){e(this).prev(".fileinput").removeClass("hover")}).focusin(function(){e(this).prev(".fileinput").addClass("focus")}).focusout(function(){e(this).prev(".fileinput").removeClass("focus")}).mousedown(function(){e(this).prev(".fileinput").addClass("active")}).mouseup(function(){e(this).prev(".fileinput").removeClass("active")}))}),i}})(jQuery); \ No newline at end of file +(function(e){e.support.cssPseudoClasses=function(){try{var t=e("").appendTo("body"),i=e('').appendTo("head");i.text("input:checked {width: 200px; display: none}");var n="200px"==t.css("width");return t.remove(),i.remove(),n}catch(s){return!1}}(),e.fn.fileinput=function(t){var i=this,n='';return t&&(n=t instanceof jQuery?e(t).wrap("").parent().html():t),i.each(function(){var t=e(this);t.wrap(''),t.parent().mousemove(function(t){var i,n,s=e(this);i=s.offset().left,n=s.offset().top,s.find("input").css({left:t.pageX-i-s.find("input[type=file]").width()+30,top:t.pageY-n-10})}),t.css({filter:"alpha(opacity=0)","-moz-opacity":0,opacity:0,position:"absolute","z-index":-1}),t.before(n),t.prev().addClass("fileinput"),e.support.cssPseudoClasses?(t.prev(".fileinput").click(function(){t.click()}),t.prev(":submit.fileinput").click(function(e){e.preventDefault()})):(t.css({"z-index":"auto",cursor:"pointer"}),t.prev(".fileinput").css("z-index",-1),t.hover(function(){e(this).prev(".fileinput").addClass("hover")},function(){e(this).prev(".fileinput").removeClass("hover")}).focusin(function(){e(this).prev(".fileinput").addClass("focus")}).focusout(function(){e(this).prev(".fileinput").removeClass("focus")}).mousedown(function(){e(this).prev(".fileinput").addClass("active")}).mouseup(function(){e(this).prev(".fileinput").removeClass("active")}))}),i}})(jQuery); \ No newline at end of file diff --git a/jquery.fileinput.js b/jquery.fileinput.js index a559e01..69652a2 100644 --- a/jquery.fileinput.js +++ b/jquery.fileinput.js @@ -46,14 +46,12 @@ }) }); - element.attr("tabindex", "-1").css({filter: "alpha(opacity=0)", "-moz-opacity": 0, opacity: 0, position: "absolute", "z-index": -1}); + element.css({filter: "alpha(opacity=0)", "-moz-opacity": 0, opacity: 0, position: "absolute", "z-index": -1}); element.before(replacementHtml); element.prev().addClass("fileinput"); if (!$.support.cssPseudoClasses) { element.css({"z-index":"auto", "cursor":"pointer"}); element.prev(".fileinput").css("z-index", -1); - element.removeAttr("tabindex"); - element.prev(".fileinput").attr("tabindex", "-1"); element.hover(function() { $(this).prev(".fileinput").addClass("hover"); }, function() {