fix text selection regression, #1193, #892

This commit is contained in:
Vladimir Agafonkin 2012-12-11 11:44:06 +02:00
parent c05e15f956
commit f203c244d4

View File

@ -105,13 +105,13 @@ L.DomUtil = {
document.selection.empty(); document.selection.empty();
} }
if (!this._onselectstart) { if (!this._onselectstart) {
this._onselectstart = document.onselectstart; this._onselectstart = document.onselectstart || null;
document.onselectstart = L.Util.falseFn; document.onselectstart = L.Util.falseFn;
} }
}, },
enableTextSelection: function () { enableTextSelection: function () {
if (document.onselectstart === L.Util.falseFn && this._onselectstart) { if (document.onselectstart === L.Util.falseFn) {
document.onselectstart = this._onselectstart; document.onselectstart = this._onselectstart;
this._onselectstart = null; this._onselectstart = null;
} }