Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Delete unused codepaths related to deprecated mutation events
Browse files Browse the repository at this point in the history
RELNOTES: n/a

PiperOrigin-RevId: 562815653
Change-Id: I2eaea10bea6d96cd05569e65ab0cba182318f688
  • Loading branch information
Closure Team authored and copybara-github committed Sep 5, 2023
1 parent 04a3002 commit 9fcff6e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions closure/goog/editor/plugins/undoredo.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,18 +248,9 @@ goog.editor.plugins.UndoRedo.prototype.enable = function(fieldObject) {
// now, but it really should be fixed to do so. The cursor position stored in
// the state should be the cursor position before any changes are made, not
// the cursor position when the change finishes.
//
// It also seems like the if check below is just a bad one. We should do this
// for browsers that use mutation events as well even though the beforechange
// happens too late...maybe not. I don't know about this.
if (!goog.editor.BrowserFeature.USE_MUTATION_EVENTS) {
// We don't listen to beforechange in mutation-event browsers because
// there we fire beforechange, then syncronously file change. The point
// of before change is to capture before the user has changed anything.
eventHandler.listen(
fieldObject, goog.editor.Field.EventType.BEFORECHANGE,
this.handleBeforeChange_);
}
eventHandler.listen(
fieldObject, goog.editor.Field.EventType.BEFORECHANGE,
this.handleBeforeChange_);
eventHandler.listen(
fieldObject, goog.editor.Field.EventType.DELAYEDCHANGE,
this.handleDelayedChange_);
Expand Down

0 comments on commit 9fcff6e

Please sign in to comment.