"Case Sensitive" option in "Find & Replace" not Working as expected when replacing all
In the "Find & Replace" feature, when "Case sensitive" is selected, the "replace all" functionality still replaces words regardless of case, which is inconsistent with the expected behavior.
Expected behavior
When "Case sensitive" is selected, the "replace all" functionality should only replace words that match the case of the search term.
Current behavior
The "replace all" functionality does not honor the "Case sensitive" option and replaces words regardless of case.
Steps to reproduce
[Provide a link to a live example or screenshots, and the steps to reproduce this bug]
- Click on the "Find & Replace" button in the toolbar
- Click on the ellipsis so you can see the replace field too
- Check the "Case sensitive" option
- Search for and replace a specific word, ensuring that the word has both uppercase and lowercase versions within the text
- Click the "replace all" button
- Check that all the words that matched to what you searched, no matter the case, are replaced
In the screenshot below, I am searching "CONTENT" and after checking "Case Sensitive", it finds only one option:
Clicking "Replace all" will actually replace all the three words even though only one of them matched the case, as in the screenshot below:
Environment
[Provide browser name and version and if you're working from a PC or Mac]