From c26ffd43c39e2b6b31c67ba7f40c56d9caff8743 Mon Sep 17 00:00:00 2001 From: Chris Rebert <code@rebertia.com> Date: Tue, 17 Mar 2015 10:24:31 -0700 Subject: [PATCH] Only disable pointer-events on disabled <a> btns; fixes #16088 <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 | 5 ++++- less/buttons.less | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dist/css/bootstrap.css b/dist/css/bootstrap.css index fb15e3d69c..15929f02ea 100644 --- a/dist/css/bootstrap.css +++ b/dist/css/bootstrap.css @@ -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; diff --git a/less/buttons.less b/less/buttons.less index 5a746049e3..740905f525 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -47,10 +47,16 @@ &[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 + } + } } -- GitLab