]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Only disable pointer-events on disabled <a> btns; fixes #16088 16092/head
authorChris Rebert <code@rebertia.com>
Tue, 17 Mar 2015 17:24:31 +0000 (10:24 -0700)
committerChris Rebert <code@rebertia.com>
Tue, 17 Mar 2015 17:29:36 +0000 (10:29 -0700)
<a> doesn't support the `[disabled]` attribute,
so `a.btn.disabled` simulates it using `pointer-events: none`.
However, this is unnecessary for <button>s and <input>s, and
also prevents their `[disabled]` cursor from displaying.

[skip sauce]
[skip validator]

dist/css/bootstrap.css
less/buttons.less

index fb15e3d69c352f7e0a7fc4c20fb9d16721a05171..15929f02eae6a1e98dd7f1194536e1e2196e208a 100644 (file)
@@ -3033,13 +3033,16 @@ select[multiple].form-group-lg .form-control {
 .btn.disabled,
 .btn[disabled],
 fieldset[disabled] .btn {
-  pointer-events: none;
   cursor: not-allowed;
   filter: alpha(opacity=65);
   -webkit-box-shadow: none;
           box-shadow: none;
   opacity: .65;
 }
+a.btn.disabled,
+fieldset[disabled] a.btn {
+  pointer-events: none;
+}
 .btn-default {
   color: #333;
   background-color: #fff;
index 5a746049e3cea5c5f912144e11850d56a36cf0d2..740905f52520573a74f5694b3d977c7d6523486e 100644 (file)
   &[disabled],
   fieldset[disabled] & {
     cursor: @cursor-disabled;
-    pointer-events: none; // Future-proof disabling of clicks
     .opacity(.65);
     .box-shadow(none);
   }
+
+  a& {
+    &.disabled,
+    fieldset[disabled] & {
+      pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
+    }
+  }
 }