Fixes #346 by blurring disabled buttons

This commit is contained in:
Patrick Brosset 2013-06-16 13:01:21 +02:00 committed by juliandescottes
parent 26f4448175
commit 6f5e2f130e

View File

@ -61,6 +61,8 @@
var button = document.querySelector('.layers-button[data-action="' + buttonAction + '"]');
if (isDisabled) {
button.setAttribute('disabled', 'disabled');
// Disabled/focused buttons consume key events on Firefox, so make sure to blur.
button.blur();
} else {
button.removeAttribute('disabled');
}