As most other gallery browers, people expect to be able to dismiss them by clicking the black frame around the image. Now the only two ways to close are the close button, or Esc, and both are not very 'mouse' friendly. (If your hand is on the mouse, the time to discover and move your mouse to the close button takes long)
The one thing I'd be concerned with, is when there are several pictures in a gallery and you've got the prev/next arrows. In this case there are –in my experience– some lightbox implementations where the sides are acting as prev/next clickable area, not as close one. Example https://en.wikipedia.org/wiki/Pinarello#/media/File:Pinarello_Dogma_F8_with_Shimano_Dura_Ace_Di2_and_Enve_6.7_Wheelset_(14667510890).jpg
Testing out the patch, it works well and the solution is good.
Per @Volker_E comment earlier, I'm not sure if the behaviour is correct. Personally I expect to click the black area to hide the UI, so closing it is not 100% perspective. @Volker_E can you and the design team make a call here and plus 2 if you think this is correct?
My main concern here would be that it is easy to mis-click the buttons which are usually in the black area, and accidentally exit from the viewer. I think we had another task about this with more discussion, but can't find anything now...
I support this change. I just checked several other lightboxes / image galleries and this seems to be standard (Facebook, Instagram, Pinterest, Twitter, Dribbble), as @Nirzar mentioned above.
Perhaps in conjunction with this (or separately) we could increase the height/affordance of the previous/next buttons, e.g.
|current height = 120px||increased height = 140px|
+1 to the idea proposed in the task in general. Additionally to the height affordance question above, we should consider to make the clickable area start from right, so that users are not going to think they are on prev/next or one of the other buttons and in reality are on the right of the button – closing MMV.
Not sure how the positioning came together, but even in current way, latter seems to meet user expectations better to me:
The button offset has been introduced in a62410616dc803d1066. Wild guess is that background image positioning was not consistently implemented back then? @MarkTraceur might be able to shed some light here?
It would not occur to me to click on the black area to close the lightbox. If anything, in a full-screen slideshow mode, I would expect clicking next to the image to advance through the gallery, although in MW I appreciate this takes you to the full size image.
Other places this could be confusing:
- 3D images (see T231895) - even if this was special-cased for 3D images, it would result in inconsistent behaviour of the frame between 3D and 2D
- Images with a black frame, e.g. pretty much anything in astronomy such as https://en.wikipedia.org/wiki/Pluto#/media/File:Pluto_charon_150709_color_final.png
There is probably an issue with the discoverability of the close button, but I don't think this is the correct solution.