How to prevent text select outside HTML5 canvas on double-click?

JavascriptWeb DevelopmentFront End Scripts

To avoid the double click text issue −

var canvas1 = document.getElementById('c');
canvas1.onselectstart = function () {
   return false;
}

Note − The Canvas should not fill the width of the page and it is only 100 pixels wide.

raja
Updated on 25-Jun-2020 07:53:07

Advertisements