]> _ Git - fluidbook-html5.git/commitdiff
fix #1505 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Jun 2017 15:16:40 +0000 (17:16 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Jun 2017 15:16:40 +0000 (17:16 +0200)
js/main.js
style/fluidbook.less

index 566df1817b2f8b5b50a91421c5b8149486abc238..598192ef250d3ae5425f6cb947284688be2a4f17 100644 (file)
@@ -285,6 +285,20 @@ try {
     function initEvents() {
         resize(true);
 
+        if (DATAS.preventRightClick) {
+            $(document).on('contextmenu', function () {
+                return false;
+            });
+
+            $(document).mousedown(function (e) {
+                if (e.button == 2) {
+                    return false;
+                } else {
+                    return true;
+                }
+            });
+        }
+
         $(window).bind('hashchange', function () {
             if (maskHashChange) {
                 return;
@@ -379,7 +393,7 @@ try {
             return false;
         });
 
-        $(document).on('click', 'a', function () { 
+        $(document).on('click', 'a', function () {
             if (!DATAS.phonegap) {
                 return true;
             }
index 86d54c5597ee08aaf8171971467b4a437848729d..8ff1038ab6f52f9b6504d58ffdc927e6b8dabe97 100644 (file)
@@ -68,6 +68,11 @@ img {
        -webkit-box-sizing: content-box;
        -ms-box-sizing: content-box;
        -o-box-sizing: content-box;
+
+       -webkit-user-select: none;
+       -moz-user-select: none;
+       -ms-user-select: none;
+       user-select: none;
 }
 
 b, strong, h1, h2, h3, h4, h5, h6 {
@@ -1423,9 +1428,22 @@ ul.chapters.shareList a.level0 img {
 
 .mview .multimediaContainer {
        padding: 0;
+       position: relative;
+       &:after {
+               content: '';
+               position: absolute;
+               z-index: 2;
+               width: 100%;
+               height: 100%;
+               top: 0;
+               left: 0;
+               pointer-events: auto;
+       }
 }
 
 .mview img.multimedia {
+       position: relative;
+       z-index: 1;
        width: 100%;
        height: auto;
        display: block;