Describe the bug
"In Firefox, when using the format painter/copy formatting feature, after selecting the source text to copy its format and clicking the format painter button, when you then select the target text to apply the formatting to, Firefox incorrectly extends the selection from the original source text all the way to the new target text, instead of selecting only the target text.
To Reproduce
Steps to reproduce the behavior:
- In firefox, have a multi line text
- Selection the first word
- Clic on "Format painter"
- Select the last word of the multi line text's last line
Expected behavior
All the text should be selected.
Screenshots
First selection

Second selection to apply format

Device Information
- OS: Ubuntu
- Browser Firefox
- Version 139.0
Additional context