diff --git a/src/dom/DomUtil.js b/src/dom/DomUtil.js index 873b9557..2f3c85a9 100644 --- a/src/dom/DomUtil.js +++ b/src/dom/DomUtil.js @@ -85,8 +85,10 @@ L.DomUtil = { }, enableTextSelection: function () { - document.onselectstart = this._onselectstart; - this._onselectstart = null; + if (this._onselectstart) { + document.onselectstart = this._onselectstart; + this._onselectstart = null; + } }, hasClass: function (el, name) {