1) reimagineGroup: Members Posts: 1Joined: 11 Sep 2007Location: IP: 71.111.--.--
Posted:
I am trying to use Supernote on the same page I'm using Lightbox. All works fine on Firefox (PC and Mac) and Safari (Mac), but in IE when I click on the thumbnail (a link within a Supernote box) it opens the image in a new window rather than over the current window with the "lightbox" effect.
If I remove Supernote, then the Lightbox effect works. Any ideas?
Thanks!
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
They'll both be trapping the document.onclick event I guess... which lightbox script is this with, and do you have a link to the site in question?
- Angus.
3) DowngangGroup: Guests IP: 85.140.--.--
Posted:
Yes, i have the same problem. Reimagine had in view Lokesh Dhakar's script - http://www.huddletogether.com. I'm disturbed: Lightbox and Supernote are both excellent scripts. Why I have to choose between of them?! I'll try to fix the problem, but it seems hopelessly.
4) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
That script uses Prototype v1.4 which extends the global Object.prototype with its own methods. This is bad behaviour that will affect every script on the page and I don't intend to patch SuperNote to avoid it!
Prototype v1.5 has wisely abandoned this approach and should be fully compatible with this script. Try dropping in v1.5 and seeing if the lightbox still works. If it doesn't, please suggest to the lightbox script author that s/he upgrade the script to Prototype v1.5.
Good luck - Angus.
5) bangersGroup: Guests IP: 79.77.--.--
Posted:
I'm just trying supernote out at the moment and came across this problem when I added supernote to a template using lightbox. I updated to Prototype.js v1.5 (also tried 1.6) but problem still continues. Has there been any further update on this problem? I'm sure there are a growing band of sites which rely on Lightbox but would like to add supernote to there site.
6) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
OK, I have solved this. The problem is that the other script is using older DOM event cancelling techniques ("return false") and the SuperNote script's document-level event capturing function renders that ineffective. To fix, in lightbox.js change this line in the updateImageList function:
anchor.onclick = function () {myLightbox.start(this); return false;}
to this:
anchor.onclick = function (evt) {myLightbox.start(this); evt = evt || window.event; evt.returnValue = false; if (evt.preventDefault) evt.preventDefault(); }
You might want to feed this back to the original author as it'll enhance Lightbox's compatibility with many other scripts too. I don't use Prototype a lot myself but I understand that it has some event management functions in its library that might help here if utilised!
Good luck - Angus.
7) bangersGroup: Members Posts: 6Joined: 9 Dec 2007Location: ukIP: 79.77.--.--
Posted:
Thanks Angus, just tried it out and it works perfectly. I'll do a little more tinkering but I should think I will start using Supernote so with donate soon. Cheers Lee
p.s Email address of original thread author is not viewable so I can't sent email