Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Heya folks,
Clicking aside (read: left or right) a lightmodal doesn't close it. This is due to the width: 100%
property in the #lightbox
css class. When one disables this property with Firebug, clicking aside the lightmodal does work. This property can't be replaced with margin: 0 auto
as the lightmodal is absolutely positioned.
Is there any fix for this? In my oppinion, this is a somewhat major problem seen from the useability point of view.
Thanks
Comment | File | Size | Author |
---|---|---|---|
#14 | lightmodal_close-978660-14.patch | 748 bytes | sxnc |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
KoCo CreditAttribution: KoCo commentedSo far, I have this only with the login pop-up. My photo albums work great.
Both have the 100% css setting, so it isn't that, by itself at least.
But the close button also doesn't work for the login popup.
investigating ...
Comment #3
fenda CreditAttribution: fenda commentedAny update on this?
Comment #4
cristian.stoica CreditAttribution: cristian.stoica commentedSubscribing. Close button doesn't work for the login popup.
Comment #5
roxy317 CreditAttribution: roxy317 commentedSubscribing. Close button and keyboard shortcuts do not close login popup.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedThat is because the photoalbum probably is a lightBOX. A login popup is most likely a lightMODAL. The problem lies in the handling of lightmodals... But where? Beats me.
Would be interesting if a Lightbox developer reviewed this.
Comment #7
rumblewand CreditAttribution: rumblewand commentedsubscribing - issue exists with Lightbox 2 as well using the out-of-the-box contact modal
Comment #8
mshepherd CreditAttribution: mshepherd commentedStill getting the same error in 6.x-1.11
Comment #9
mshepherd CreditAttribution: mshepherd commentedLooks like it's a z-index problem. I've fixed it with this CSS in my theme, but I guess this should be part of the module?
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedDoesn't look like this is working here. I tried this style on a few lightbox elements, but setting that z-index just sends the element to the back. Which html element are you applying
.lightmodal-login #frameHoverNav
to? I don't have a#frameHoverNav
.Comment #11
mshepherd CreditAttribution: mshepherd commentedThis is the html my version of lightbox2 generates. #frameHoverNav is down towards the bottom. I guess this isn't relevant to the modal login box. It sounds like it's part of the image navigation that shouldn't be displayed here. Maybe setting it to
display: none
would work too, even fot he whole of #imageDataComment #12
quotesBro CreditAttribution: quotesBro commentedComment #13
quotesBro CreditAttribution: quotesBro commentedand
both worked fine for me, thanks mshepherd.
But it's not a real solution.
Comment #14
sxnc CreditAttribution: sxnc commentedHad the same issue today and managed to fix it, for lightmodal there was a "$('#lightbox').unbind('click');" which also appears for other options like images and so on but they rebind the #lightbox right after that.
Comment #15
Cablestein CreditAttribution: Cablestein commentedThe patch works for me.
Hopefully will make it into the next release!
Comment #16
xamount CreditAttribution: xamount commentedThis patch did not work for me (using Drupal 7).
Comment #17
lrolando CreditAttribution: lrolando commentedWhen changing the width of the div #lightbox (from 100% to a static width), we faced the problem that we couldn't center it correctly.
We decided to use some dirty css tricks and hardcoded widths to fix this problem until a solution is posted. This is the css used:
Comment #18
imading CreditAttribution: imading commented#16 xamount
In fact, you can read the code inside the patch. And add/remove the code required.
In this case, it is "lightbox.js".
and simply find the lines affected and + - the lines.
Comment #19
nindroidx CreditAttribution: nindroidx commentedThe patch still works in Drupal 7 (applied with Netbeans), Thanks!
Comment #20
c470ip CreditAttribution: c470ip commentedThe patch really works for D7, but unfortunately it still doesn't allow to close the lightmodal window using keyboard shortcuts.
To enable closing the modal with keyboard, just comment out the lines
(only in case you don't use lightmodal for forms of course).