Comments (1)
Hello,
Désolée je parle français.
J'avais le même souci.
J'ai apporté une modification dans le js au niveau de : elems navigation with mousewheel
le code vérifie si l’élément cible ou ses parents ont des barres de défilement.
Si c’est le cas, il ne déclenche pas l’événement switch_elem.
En conséquence, le scroll de la souris ne fonctionne pas lorsque le texte est caché (txt_hidden est true).
Modification sur la condition qui vérifie si l’élément cible ou ses parents ont des barres de défilement :
j'ai ajouté une condition supplémentaire pour vérifier si txt_hidden est true. Si c’est le cas, on force l’exécution de switch_elem.
`$(document).on('wheel', '#lcl_overlay, #lcl_window, #lcl_thumbs_nav:not(.lcl_tn_has_arr)', function(e) {
if(obj != lcl_curr_obj || !lcl_curr_opts.mousewheel) {return true;}
var
// if not in window, do it!
if(!$target.is('#lcl_window') && !$target.parents('#lcl_window').length) {
e.preventDefault();
var delta = e.originalEvent.deltaY;
if(delta > 0) {switch_elem('next');}
else {switch_elem('prev');}
}
else {
// cycle to know if parents have scrollers
var perform = true;
for(a=0; a<20; a++) {
if($target.is('#lcl_window')) {break;}
if($target[0].scrollHeight > $target.outerHeight() && !lcl_settings.txt_hidden) {
perform = false;
break;
}
else {
$target = $target.parent();
}
}
if(perform) {
e.preventDefault();
var delta = e.originalEvent.deltaY;
if(delta > 0) {switch_elem('next');}
else {switch_elem('prev');}
}
}
});
`
Dans mon cas, la modification a fonctionné.
Prudence quand même à d'autres éventuels effets secondaires.
LCweb-ita, au cas où, tu pourras confirmer si c'est correct ou pas ?
from lc-lightbox-lite.
Related Issues (10)
- problem with merging HOT 1
- How to force enable "toggle thumbnails" in responsive ? HOT 1
- The automatically switching smart system: "under" vs "over" HOT 1
- Does this supports lazyload? HOT 1
- Bug when using multiple lightbox at same page HOT 2
- Show album title
- Multiple LightBox in same web page HOT 2
- License inquiry HOT 3
- how to change URL when the lightbox is open? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lc-lightbox-lite.