Loading
Fix find_and_replace div positioning; handle resize; fix lil bugs; add specs
What does this MR do and why?
Closes Handle textarea resize when searched text is hi... (#524289 - closed).
We fix a few things:
- Fix the positioning. It was offset by 2px vertically for Reasons™ I detail in the (human-authored!) message in the first commit.
- Handle resize; i.e. the ask of Handle textarea resize when searched text is hi... (#524289 - closed).
- Fix a little bug when matches break in the textarea but weren't in the clone div.
- Add some specs.
Screenshots or screen recordings
| What | Before | After |
|---|---|---|
| Find, and resize | ||
| Find with match breaking over line | *See below. |
* N.B.: This "Before" is between commits 2 and 3 in this MR, when I noticed this issue. You can't observe it with a resize unless you do the same (since the resize fix only came in commit 2, and then I fixed this in commit 3), but it reproduces on master if you have the match words wrapping before you start your search.
How to set up and validate locally
- Enable the
find_and_replaceFF on your GDK. - Open the plain-text Markdown editor with a document that has stuff to find.
- Cmd-F (Linux/Windows: Ctrl-F) and search; note it looks wrong.
- Resize the window; watch the matches disconnect from their source!
- Check this branch out.
- Repeat 2-4 and note that things look right.
- Try with a match with a space in it, and resize to have it wrap halfway through; it should Just Work™.
- Birds
🐦⬛
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Asherah Connor