Skip to content

Fixed isolated clipboard paste overwriting trailing text - #1558

Merged
dbuechel merged 1 commit into
SafeExamBrowser:masterfrom
simonmwessel:fix/clipboard-paste
Oct 12, 2026
Merged

dbuechel merged 1 commit into
SafeExamBrowser:masterfrom
simonmwessel:fix/clipboard-paste

Conversation

@simonmwessel

Copy link
Copy Markdown
Contributor

Problem

When text is pasted into a prepared string inside an input, parts of the text after the cursor get replaced.

The problem is reproducible in the current SEB 3.10.2 (x64) build on Windows 11 with the isolated clipboard option "SEB Only" enabled and the SEB configuration provided by SEB Server.

Changes

The two setRangeText() calls were replaced with a single call using the original selection boundaries.

Reproduction

To reproduce, copy 123 inside SEB and paste it between B and C in a field containing ABCD. The expected result is AB123CD, but the affected version produces AB123.

Validation

The fix was tested manually and with local regression tests.

Note

AI usage: ChatGPT was used to help analyse the issue, suggest the fix and prepare local regression tests for validation.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.79%. Comparing base (016d234) to head (180b10e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1558      +/-   ##
==========================================
- Coverage   26.81%   26.79%   -0.03%     
==========================================
  Files         576      576              
  Lines       30219    30219              
  Branches     3280     3280              
==========================================
- Hits         8104     8096       -8     
- Misses      21805    21810       +5     
- Partials      310      313       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@simonmwessel
simonmwessel requested a balanced review from Copilot October 8, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@dbuechel dbuechel 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.

Excellent, thank you very much for the contribution, it is highly appreciated.

@dbuechel
dbuechel merged commit 376378a into SafeExamBrowser:master Oct 12, 2026
2 of 3 checks passed
@dbuechel dbuechel added this to the 4.0.0 milestone Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants