diff --git a/src/control/Control.Layers.js b/src/control/Control.Layers.js index 2ed054b1..5e6f7b73 100644 --- a/src/control/Control.Layers.js +++ b/src/control/Control.Layers.js @@ -198,8 +198,13 @@ L.Control.Layers = L.Control.extend({ var name = document.createElement('span'); name.innerHTML = ' ' + obj.name; - label.appendChild(input); - label.appendChild(name); + // Helps from preventing layer control flicker when checkboxes are disabled + // https://github.com/Leaflet/Leaflet/issues/2771 + var holder = document.createElement('div'); + + label.appendChild(holder); + holder.appendChild(input); + holder.appendChild(name); var container = obj.overlay ? this._overlaysList : this._baseLayersList; container.appendChild(label);