fix preventOutline for nested elements, close #3606

This commit is contained in:
Vladimir Agafonkin 2015-07-10 18:30:44 +03:00
parent cdb9ce0beb
commit bf234810f0

View File

@ -221,6 +221,10 @@ L.DomUtil = {
}; };
L.DomUtil.preventOutline = function (element) { L.DomUtil.preventOutline = function (element) {
while (element.tabIndex === -1) {
element = element.parentNode;
}
if (!element) { return; }
L.DomUtil.restoreOutline(); L.DomUtil.restoreOutline();
this._outlineElement = element; this._outlineElement = element;
this._outlineStyle = element.style.outline; this._outlineStyle = element.style.outline;