Last modified: 2013-06-18 15:27:09 UTC
Created attachment 6609 [details]
Microsoft Word application functionality
Reporting against build r57044 in staging environment
Steps to reproduce ::
1) Start creating a new page
2) Enter several statements in the text area.
3) Click on 'Search and replace' icon.
4) Set search for with 'Calcey' and replace with ='MediaWiki'.
5) Now click on 'Find Next' button.
<<First 'Calcey' text has highlighted>>
6) Now click on 'Replace Next' button.
<<Second 'Calcey' text has changed to 'MediaWiki'>>
Expected Outcome ::
User should able to replace the first 'Calcey' value with the 'MediaWiki' word.
Change the 'Replace Next' button caption and functionality into 'Replace'.
Then the user can replace the text from the first expected found values.
I have attached the current functionality of the Microsoft word application.
bug 20893 comment 3 makes some points in favor of this request.
Agreed. With the current UI, there is no way to find, and the replace that which has been found. By contrast one can find, and then replace_next, which replaces some random item you've not yet seen, somewhere lower down the page. Bizarre.
*** Bug 24327 has been marked as a duplicate of this bug. ***
Bug 24327 is essentially a dupe of this one, but its description summarizes the problem very well:
In the search & replace dialog a "Replace and find next" button would be much
more helpful than the "Replace next".
I support this request. This has been a interaction design issue for a very long time. It is very strange that the usability team made such a blatant mistake, as the rest of the features they produced doesn't contain such blatant mistakes.
I would very much like to see this one fixed.
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Created attachment 9055 [details]
Patch to fix the problem. Should be tested.
"Replace next" now replaces the currently selected text instead of finding the next occurrence and replacing it.
To keep the location of the current occurrence, i added matchIndex to $(this).data.
I added some comments renamed a couple of variable for readability:
* s to textRemainder
* replace to actualReplacement
This is my first significant jQuery-style patch so it may have embarrassing mistakes - constructive criticism is welcome.
Committed in r96944.
*** Bug 32062 has been marked as a duplicate of this bug. ***
(In reply to comment #8)
> Committed in r96944.
Followed up in r101339: renamed "Replace next" button to "Replace".