ordinals / ord

šŸ‘ā€šŸ—Ø Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.85k stars 1.38k forks source link

Improve iframe scrollbars #4048

Closed casey closed 1 day ago

casey commented 2 weeks ago

There's been issues and PRs about this, but I wanted to consolidate them in one place and provide an overview of the situation.

On iframes whose content overflows their element, the browser will draw scroll bars and allow the user to scroll the contents of the iframe with the scroll wheel or touchpad.

In ord iframes originally had scrolling=no, which disables scrolling, but I don't believe disables affects display of scrollbars. On macOS this isn't an issue, because scroll bars are invisible by default, only appearing when the content is actually scrolled. When scrolling is disabled, they never appear. If the user is using a mouse, or the default settings are changed, scrollbars will always appear.

In #3944, someone asked us to enable scrolling on iframes, referencing this inscription, which clearly benefits being able to scroll its content.

We removed scrolling=no from iframe elements in #3947.

In #3990, @gmart7t2 reported that a bunch of inscriptions now had scroll bars.

In #4042, I added scrolling=no back to inscription thumbnail iframes, so every iframe except the main one on /inscription. I also modified the image preview, to make images not overflow the page. This removed scrollbars from all image inscrpitions.

So now, here's where I think we are:

Unfortunately, I'm not sure that we can prevent scrollbars from appearing entirely on inscription thumbnails. I don't think this has ever changed though, I think they've always been there.

Is there any cross-browser way that we can hide scrollbars on all inscription previews? I haven't seen a good solution for this.

Should we put scrolling=no back on the main inscription preview on /inscription? I think scrollbars are incredibly ugly, and you can always click on the preview to get it full screen, in which case it will scroll, but some people might want scrolling on the main preview.

casey commented 1 day ago

I'm going to close this for now. I believe this has been addressed to the extent possible.

I think the big unfortunate issue is overflowing HTML inscription thumbnails having scrollbars, but I think that's unfixable.