Lightbox: Fix clicks outside of zoomable area
This commit is contained in:
parent
04c08a624b
commit
b38590a4ac
2 changed files with 30 additions and 22 deletions
|
@ -129,6 +129,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__zoomable-container {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
&__zoom-button {
|
&__zoom-button {
|
||||||
@include button-reset;
|
@include button-reset;
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
|
|
|
@ -427,6 +427,7 @@ export function Lightbox({
|
||||||
if (isImageTypeSupported) {
|
if (isImageTypeSupported) {
|
||||||
if (objectURL) {
|
if (objectURL) {
|
||||||
content = (
|
content = (
|
||||||
|
<div className="Lightbox__zoomable-container">
|
||||||
<button
|
<button
|
||||||
className="Lightbox__zoom-button"
|
className="Lightbox__zoom-button"
|
||||||
onClick={zoomButtonHandler}
|
onClick={zoomButtonHandler}
|
||||||
|
@ -449,6 +450,7 @@ export function Lightbox({
|
||||||
ref={imageRef}
|
ref={imageRef}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
content = (
|
content = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue