Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#9038 closed defect (fixed)

dojox.image.lightbox is completely broken in 1.3

Reported by: Aleksey Rechinskiy Owned by: dante
Priority: high Milestone: 1.4
Component: Dojox Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

Hi.. I can't believe the dojo components is such badly tested before new release, but it is :(

dojox.image.lightbox can hang a page completely in some cases in FF3.0.8 or IE6 (have not tested in other browsers). See below:

behavior 1.

  • resize you browser to height, smaller than height of "tall" picture, referenced on the page. 1024x450 is enough.
  • click on 'large than viewport?' in "Individual" section to see blue rectangle. Close lightbox.
  • next click on 'tall' to hang the page. It will display only a small white rectangle instead of picture without any controls to close that "Lightbox". Also, you wouldn't be able to refresh the page with ctrl+r, it just wouldn't work.

Looks like, you will get the same behavior, if you first click on any other link, not only 'large than viewport?'.

If you play a bit more with the page after reloading, you can find a lot of other bugs.

For example:

behavior 2.

  • open the page in browser window maximized
  • click 'tall' to see the picture. Close lightbox.
  • resize browser window to same 1024x450
  • click 'tall' again to lock the page in other way. You will see only a underlay, but no lightbox. Have you noticed scrollbars? Try to scroll page down...

behavior 3.

  • open the page in browser window maximized
  • click 'tall' to see the picture. Don't close it
  • resize browser window to smaller size. Now you will not be able to close lightbox again.

I have found another bug with lightbox, but can't reproduce it on the test page. Under certain cases, after closing a lightbox, the page layout can be damaged. It looks like the page got very big or moved offscreen invisible element, that cause a scrollbars to appear. If one moves the scrollbars, no element becomes visible, only empty space. I think, that bug can be caused by the same issue, as bugs I described earlier, so I'll check if it appears after fix will be available.

Hope it will be fixed very soon.

Also, I would suggest to connect "onclick" on underlay to Lightbox::hide(). It would greatly improve usability of a Lightbox. In a light of single DialogUnderlay? instance in dijit._underlay, you'll have to make some simple isLightboxOpened() tracking code, and check it before actually calling hide() function. Underlay "onclick" should be connected to hide() function, not any other function, to protect any lightbox-derived classes.

Change History (3)

comment:1 Changed 11 years ago by dante

Milestone: 1.3.11.4
Owner: changed from Adam Peller to dante
Priority: highnormal
severity: blockernormal
Status: newassigned

Yah, I was lucky to even get lightbox working again. things in dijit changed and had completely broken IE, which appeared a simple fix but something else is going on. Will look into this, and determine if is trivial enough to put into 1.3.1

also, the onclick request is part of another ticket already.

I will likely just strip Lightbox of it's Dialog inheritance, do a lightweight version, and avoid the constant headache that has been regression testing Lightbox.

comment:2 Changed 11 years ago by dante

Resolution: fixed
Status: assignedclosed

in [17205] I _think_ I hit most of what you addressed above (as well as a hoard of other tickets). Please test trunk (or simply grab the new Lightbox.html template and Lightbox.js code and drop it in over a 1.3.0 release) and see if the problems persist. Lots of notes in the checkin notice. Marking this as fixed, but please test these fixes and open new tickets for anything missed or persisting.

comment:3 Changed 11 years ago by Aleksey Rechinskiy

That is nice you have provided a patch so fast, thank you. Works much better, but still has some seriuos bugs uncaught. Please, take a look into #9073 and see if you can solve them, while you clearly remember the context of the lightbox.

Note: See TracTickets for help on using tickets.