]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix drag knob in firefox #7
authorJacob Thornton <jacobthornton@gmail.com>
Sat, 20 Aug 2011 03:37:12 +0000 (20:37 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Sat, 20 Aug 2011 03:37:12 +0000 (20:37 -0700)
docs/assets/js/application.js

index 82cf307e91bc45faa2eb342479248e8282ee13bd..0de6ca96f64a814ab15268c71e89c398fcd0366d 100644 (file)
@@ -92,10 +92,9 @@ $(document).ready(function(){
 
   // Copy code blocks in docs
   $(".copy-code").focus(function() {
-    $(this).select();
-  });
-  $(".copy-code").mouseup(function(e) {
-    e.preventDefault();
+    var el = this;
+    // push select to event loop for chrome :{o
+    setTimeout(function () { $(el).select(); }, 1);
   });