Skip to content

Commit

Permalink
Fixed #231 - disableRightClick doesn't. Thanks to @DrMint for the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Arinas committed Apr 14, 2021
1 parent 95ea8ad commit 5b19221
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 19 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ Run `gulp watch` to enable continous watching of both src/simple-lightbox.js and
Just call `gulp build` to have all files and variants created inside dist!

### Changelog
**2.7.2 - Fixed #231 - disableRightClick doesn't. Thanks to @DrMint for the fix**
**2.7.1 - Fixed #228 - no mouse swiping in firefox. Thanks to @DrMint for the fix**
**2.7.0 - Merged #206 which fixes #205. Thanks to @ocean90 for the idea and PR**
**2.6.0 - Added new option uniqueImages for #156, focus for #190 and fixed bug #200 issue closing during animation**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "2.7.1",
"version": "2.7.2",
"homepage": "https://simplelightbox.com/",
"authors": [
"André Rinas <info@andrerinas.de> (https://www.andrerinas.de)"
Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.7.1
Version 2.7.2
*/
body.hidden-scroll {
overflow: hidden; }
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-lightbox.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.7.1
Version 2.7.2
*/
class SimpleLightbox {

Expand Down Expand Up @@ -201,7 +201,7 @@ class SimpleLightbox {
// disable rightclick
if (this.options.disableRightClick) {
this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, (event) => {
if (event.target.classList.contains('sl-overlay')) {
if (event.target.parentElement.classList.contains("sl-image")) {
event.preventDefault();
}
});
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-lightbox.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.7.1
Version 2.7.2
*/
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
Expand Down Expand Up @@ -249,7 +249,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

if (this.options.disableRightClick) {
this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, function (event) {
if (event.target.classList.contains('sl-overlay')) {
if (event.target.parentElement.classList.contains("sl-image")) {
event.preventDefault();
}
});
Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.jquery.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.7.1
Version 2.7.2
*/
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){(function (){
Expand Down Expand Up @@ -236,7 +236,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

if (this.options.disableRightClick) {
this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, function (event) {
if (event.target.classList.contains('sl-overlay')) {
if (event.target.parentElement.classList.contains("sl-image")) {
event.preventDefault();
}
});
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-lightbox.legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.7.1
Version 2.7.2
*/
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
require('../modules/es.symbol');
Expand Down Expand Up @@ -12303,7 +12303,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

if (this.options.disableRightClick) {
this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, function (event) {
if (event.target.classList.contains('sl-overlay')) {
if (event.target.parentElement.classList.contains("sl-image")) {
event.preventDefault();
}
});
Expand Down
2 changes: 1 addition & 1 deletion dist/simple-lightbox.legacy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/simple-lightbox.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/simple-lightbox.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/simple-lightbox.modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.7.1
Version 2.7.2
*/
"use strict";

Expand Down Expand Up @@ -234,7 +234,7 @@ var SimpleLightbox = /*#__PURE__*/function () {

if (this.options.disableRightClick) {
this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, function (event) {
if (event.target.classList.contains('sl-overlay')) {
if (event.target.parentElement.classList.contains("sl-image")) {
event.preventDefault();
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "2.7.1",
"version": "2.7.2",
"description": "Touch-friendly modern image lightbox for mobile and desktop with optional jQuery support",
"main": "dist/simple-lightbox.js",
"style": "dist/simple-lightbox.css",
Expand Down
2 changes: 1 addition & 1 deletion src/license-notice.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
Version 2.7.1
Version 2.7.2
*/
2 changes: 1 addition & 1 deletion src/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class SimpleLightbox {
// disable rightclick
if (this.options.disableRightClick) {
this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, (event) => {
if (event.target.classList.contains('sl-overlay')) {
if (event.target.parentElement.classList.contains("sl-image")) {
event.preventDefault();
}
});
Expand Down

0 comments on commit 5b19221

Please sign in to comment.