Skip to content

Allow scroll propagation outside code editor#36502

Merged
lunny merged 3 commits intogo-gitea:mainfrom
lunny:lunny/fix_edito_scroll
Feb 1, 2026
Merged

Allow scroll propagation outside code editor#36502
lunny merged 3 commits intogo-gitea:mainfrom
lunny:lunny/fix_edito_scroll

Conversation

@lunny
Copy link
Copy Markdown
Member

@lunny lunny commented Jan 31, 2026

Fix #28479

When scrolling inside the editor and the editor has already reached the end of its scroll area, the browser does not continue scrolling. This is inconvenient because users must move the cursor out of the editor to scroll the page further.

This PR enables automatic switching between the editor’s scroll and the browser’s scroll, allowing seamless continuous scrolling.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 31, 2026
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Jan 31, 2026
@lunny lunny added the backport/v1.25 This PR should be backported to Gitea 1.25 label Jan 31, 2026
@silverwind
Copy link
Copy Markdown
Member

Tested, works.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 31, 2026
@silverwind silverwind changed the title Fix scroll in the editor Allow scroll propagation outside editor Jan 31, 2026
@silverwind silverwind changed the title Allow scroll propagation outside editor Allow scroll propagation outside code editor Jan 31, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 1, 2026
@silverwind silverwind added this pull request to the merge queue Feb 1, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to Branch Protection failures Feb 1, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@silverwind silverwind added this pull request to the merge queue Feb 1, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to Branch Protection failures Feb 1, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 1, 2026
@lunny lunny enabled auto-merge (squash) February 1, 2026 06:01
@lunny lunny merged commit e377da9 into go-gitea:main Feb 1, 2026
24 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Feb 1, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 1, 2026
@lunny lunny deleted the lunny/fix_edito_scroll branch February 1, 2026 06:15
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Feb 1, 2026
Fix go-gitea#28479

When scrolling inside the editor and the editor has already reached the
end of its scroll area, the browser does not continue scrolling. This is
inconvenient because users must move the cursor out of the editor to
scroll the page further.

This PR enables automatic switching between the editor’s scroll and the
browser’s scroll, allowing seamless continuous scrolling.
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Feb 1, 2026
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 1, 2026
* origin/main:
  Fix incorrect vendored detections (go-gitea#36508)
  Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379)
  Unify repo names in system notices (go-gitea#36491)
  Allow scroll propagation outside code editor (go-gitea#36502)
  Refactor ActionsTaskID (go-gitea#36503)
  Update JS deps, remove `knip`, misc tweaks (go-gitea#36499)
  [skip ci] Updated translations via Crowdin
  Fix editorconfig not respected in PR Conversation view (go-gitea#36492)
  Add FOLDER_ICON_THEME configuration option (go-gitea#36496)
  Don't create self-references in merged PRs (go-gitea#36490)
  Use reserved .test TLD for unit tests (go-gitea#36498)
  Fix bug when list pull request commits (go-gitea#36485)
  Update some go dependencies (go-gitea#36489)
  chore: add comments for "api/healthz", clean up test env (go-gitea#36481)
lunny added a commit that referenced this pull request Feb 1, 2026
Backport #36502 by @lunny

Fix #28479

When scrolling inside the editor and the editor has already reached the
end of its scroll area, the browser does not continue scrolling. This is
inconvenient because users must move the cursor out of the editor to
scroll the page further.

This PR enables automatic switching between the editor’s scroll and the
browser’s scroll, allowing seamless continuous scrolling.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 2, 2026
* giteaofficial/main: (26 commits)
  [skip ci] Updated translations via Crowdin
  Remove and forbid `@ts-expect-error` (go-gitea#36513)
  Add resolve/unresolve review comment API endpoints (go-gitea#36441)
  Fix incorrect vendored detections (go-gitea#36508)
  Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379)
  Unify repo names in system notices (go-gitea#36491)
  Allow scroll propagation outside code editor (go-gitea#36502)
  Refactor ActionsTaskID (go-gitea#36503)
  Update JS deps, remove `knip`, misc tweaks (go-gitea#36499)
  [skip ci] Updated translations via Crowdin
  Fix editorconfig not respected in PR Conversation view (go-gitea#36492)
  Add FOLDER_ICON_THEME configuration option (go-gitea#36496)
  Don't create self-references in merged PRs (go-gitea#36490)
  Use reserved .test TLD for unit tests (go-gitea#36498)
  Fix bug when list pull request commits (go-gitea#36485)
  Update some go dependencies (go-gitea#36489)
  chore: add comments for "api/healthz", clean up test env (go-gitea#36481)
  [SECURITY] Toolchain Update to Go 1.25.6 (go-gitea#36480)
  [skip ci] Updated translations via Crowdin
  Render merged pull request title as such in dashboard feed (go-gitea#36479)
  ...
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 4, 2026
* origin/main: (1246 commits)
  fix(packages/container): data race when uploading container blobs concurrently (go-gitea#36524)
  [skip ci] Updated translations via Crowdin
  Remove and forbid `@ts-expect-error` (go-gitea#36513)
  Add resolve/unresolve review comment API endpoints (go-gitea#36441)
  Fix incorrect vendored detections (go-gitea#36508)
  Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379)
  Unify repo names in system notices (go-gitea#36491)
  Allow scroll propagation outside code editor (go-gitea#36502)
  Refactor ActionsTaskID (go-gitea#36503)
  Update JS deps, remove `knip`, misc tweaks (go-gitea#36499)
  [skip ci] Updated translations via Crowdin
  Fix editorconfig not respected in PR Conversation view (go-gitea#36492)
  Add FOLDER_ICON_THEME configuration option (go-gitea#36496)
  Don't create self-references in merged PRs (go-gitea#36490)
  Use reserved .test TLD for unit tests (go-gitea#36498)
  Fix bug when list pull request commits (go-gitea#36485)
  Update some go dependencies (go-gitea#36489)
  chore: add comments for "api/healthz", clean up test env (go-gitea#36481)
  [SECURITY] Toolchain Update to Go 1.25.6 (go-gitea#36480)
  [skip ci] Updated translations via Crowdin
  ...

# Conflicts:
#	modules/templates/helper.go
#	options/locale/locale_en-US.ini
#	routers/web/repo/cherry_pick.go
#	routers/web/repo/editor.go
#	routers/web/repo/patch.go
#	templates/repo/editor/edit.tmpl
#	web_src/js/features/codeeditor.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/done All backports for this PR have been created backport/v1.25 This PR should be backported to Gitea 1.25 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend topic/ui Change the appearance of the Gitea UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make MonacoEditor scroll with parent container when mouse hovers&scrolls

4 participants