mirror of
https://github.com/immich-app/immich.git
synced 2026-03-22 03:49:36 +03:00
fix(web): allow images to be downloaded again(long-press or right click) (#26992)
This commit is contained in:
@@ -64,6 +64,20 @@ test.describe('Photo Viewer', () => {
|
|||||||
await expect(original).toHaveAttribute('src', /fullsize/);
|
await expect(original).toHaveAttribute('src', /fullsize/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('right-click targets the img element', async ({ page }) => {
|
||||||
|
await page.goto(`/photos/${asset.id}`);
|
||||||
|
|
||||||
|
const preview = page.getByTestId('preview').filter({ visible: true });
|
||||||
|
await expect(preview).toHaveAttribute('src', /.+/);
|
||||||
|
|
||||||
|
const box = await preview.boundingBox();
|
||||||
|
const tagAtCenter = await page.evaluate(({ x, y }) => document.elementFromPoint(x, y)?.tagName, {
|
||||||
|
x: box!.x + box!.width / 2,
|
||||||
|
y: box!.y + box!.height / 2,
|
||||||
|
});
|
||||||
|
expect(tagAtCenter).toBe('IMG');
|
||||||
|
});
|
||||||
|
|
||||||
test('reloads photo when checksum changes', async ({ page }) => {
|
test('reloads photo when checksum changes', async ({ page }) => {
|
||||||
await page.goto(`/photos/${asset.id}`);
|
await page.goto(`/photos/${asset.id}`);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
onLoad={() => adaptiveImageLoader.onLoad(quality)}
|
onLoad={() => adaptiveImageLoader.onLoad(quality)}
|
||||||
onError={() => adaptiveImageLoader.onError(quality)}
|
onError={() => adaptiveImageLoader.onError(quality)}
|
||||||
bind:ref
|
bind:ref
|
||||||
class="h-full w-full bg-transparent"
|
class="h-full w-full bg-transparent pointer-events-auto"
|
||||||
{alt}
|
{alt}
|
||||||
{role}
|
{role}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
|
|||||||
Reference in New Issue
Block a user