Browse Source

Prevent firefox image dragging

master
Eduard Kuzmenko 3 years ago
parent
commit
1d3572c3d9
  1. 8
      src/index.ts

8
src/index.ts

@ -154,6 +154,14 @@ console.timeEnd('get storage1'); */ @@ -154,6 +154,14 @@ console.timeEnd('get storage1'); */
});
}
// prevent firefox image dragging
document.addEventListener('dragstart', (e) => {
if((e.target as HTMLElement)?.tagName === "IMG") {
e.preventDefault();
return false;
}
});
if(userAgent.isApple) {
if(userAgent.isSafari) {
document.documentElement.classList.add('is-safari');

Loading…
Cancel
Save