Page MenuHomePhabricator

Search & Replace: Change "Replace Next" functionality to "Replace" functionality
Closed, ResolvedPublic


Author: wikibugs

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.


  1. Click on 'Search and replace' icon.
  2. Set search for with 'Calcey' and replace with ='MediaWiki'.
  3. Now click on 'Find Next' button.

<<First 'Calcey' text has highlighted>>

  1. 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.

Suggestion ::
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.

Version: unspecified
Severity: normal
OS: Windows Vista
Platform: PC


Screen_shot_1.jpg (215×547 px, 19 KB)



Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:56 PM
bzimport set Reference to bz20919.

bug 20893 comment 3 makes some points in favor of this request.

simon wrote:

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.

Created attachment 9055
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.


  • 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".