(element)
| 2620 | // focusable elements from displaying an outline when the user performs a |
| 2621 | // drag interaction on them. |
| 2622 | function preventOutline(element) { |
| 2623 | while (element.tabIndex === -1) { |
| 2624 | element = element.parentNode; |
| 2625 | } |
| 2626 | if (!element.style) { return; } |
| 2627 | restoreOutline(); |
| 2628 | _outlineElement = element; |
| 2629 | _outlineStyle = element.style.outlineStyle; |
| 2630 | element.style.outlineStyle = 'none'; |
| 2631 | on(window, 'keydown', restoreOutline); |
| 2632 | } |
| 2633 | |
| 2634 | // @function restoreOutline() |
| 2635 | // Cancels the effects of a previous [`L.DomUtil.preventOutline`](). |
no test coverage detected