Skip to content

scrollable-areas - Disable on click#9363

Merged
fregante merged 6 commits into
mainfrom
copilot/disable-scrollable-areas-on-click
May 7, 2026
Merged

scrollable-areas - Disable on click#9363
fregante merged 6 commits into
mainfrom
copilot/disable-scrollable-areas-on-click

Conversation

Copilot AI commented May 6, 2026

Copy link
Copy Markdown
Contributor

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but it needs testing

Comment thread source/features/scrollable-areas.tsx Outdated
@fregante fregante marked this pull request as ready for review May 7, 2026 03:59
Copilot AI changed the title [WIP] Add functionality to disable scrollable areas on click Add functionality to disable scrollable areas on click May 7, 2026
Copilot AI requested a review from fregante May 7, 2026 04:00
@fregante fregante changed the title Add functionality to disable scrollable areas on click scrollable-areas - Disable on click May 7, 2026
Comment thread source/features/scrollable-areas.css Outdated
blockquote,
pre {
blockquote:not(.rgh-scrollable-expanded),
pre:not(.rgh-scrollable-expanded) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the selector to exclude nested scrollable area. Most likely it should be:

	.comment-body,
	[data-testid='markdown-body'] {
		blockquote,
		pre {
			&:not(
				/* Exclude clicked areas */
				.rgh-scrollable-expanded,
				/* Exclude nested scrollable areas */
				blockquote,
				pre
			)
		}
	}

The selectors in the TSX file don't need to be updated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 4c03ba9. Used :not(.rgh-scrollable-expanded, :is(blockquote, pre) :is(blockquote, pre)) — the :is() shorthand covers all four nested combinations cleanly and also replaces the old :is(details, blockquote) :is(blockquote, pre) { max-height: none } override rule.

Comment thread source/features/scrollable-areas.css Outdated
…parent' from sync comments

Agent-Logs-Url: https://github.com/refined-github/refined-github/sessions/8fc606fd-ed59-4f6b-9653-e7ca84d0e904

Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, it works!

I noticed that there has been a regression for quite a while. We don't want nested areas to be scrollable.

Copilot AI requested a review from fregante May 7, 2026 18:29
@fregante fregante enabled auto-merge (squash) May 7, 2026 18:56
@fregante fregante merged commit 144e856 into main May 7, 2026
9 checks passed
@SunsetTechuila SunsetTechuila deleted the copilot/disable-scrollable-areas-on-click branch May 7, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Disable scrollable-areas on click

2 participants