I had previously made a change to do this in the base class but overloooked that it was also a factor in this subclass, so I refactored a little to have a single method in the base class that handles this. (Note: the base class method also checks to be sure that the client responds to the attributedSubstringFromRange method before calling it. This used to be done only in the subclass, but it seems like a useful safeguard in case some other client fails to implement this.
Added (and then commented out) code to have Firefox pretend not to change selection without reporting. Ths code improves some things but makes other things worse. I need to compare it to behavior before refactoring.
Added logic to correct bug in Safari Google Docs introduced a few months back to clear selection after replacement. Refactored code and fixed bug to correctly handle Chrome's need to replace characters individually.