Reputation: 12205
I'm using this jfiddle. In chrome when I click the image it doesn't produce a dotted line but when I click the image in firefox a dotted line appears.
.
How can I remove the dotted line?
I've tried:
#myButton:focus {
outline: 0;
}
#myButton:active {
outline: none;
border: none;
}
But that didn't work.
Upvotes: 1
Views: 1889
Reputation: 6411
Try this:
button::-moz-focus-inner {
border:0;
}
button
can be replaced with whatever selector for which you want to disable the behavior.
P.S: It also works without a selector by just using ::-moz-focus-inner
.
Upvotes: 3
Reputation: 514
Basically you want to blur it onfocus with javascript. If using jquery:
$(function() {
var button = $("#myButton");
$(button).focus(function() {
$(this).blur();
});
});
Or without jquery something like this:
var button = document.getElementById("myButton");
button.onfocus = function() { button.blur(); }
With my test on Firefox on Ubuntu, original jfiddle produced dotted line, updated does not.
Upvotes: 0