Changeset 205499 in webkit


Ignore:
Timestamp:
Sep 6, 2016 12:56:37 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Cannot undo in breakpoint editor
https://bugs.webkit.org/show_bug.cgi?id=152858

Patch by Devin Rousso <Devin Rousso> on 2016-09-06
Reviewed by Brian Burg.

  • UserInterface/Controllers/BreakpointPopoverController.js:

(WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorBeforeChange):
Since the breakpoint editor only allows a single line of JavaScript, it attempts to remove
all "\n" characters. During an "undo" action, this is not possible.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r205426 r205499  
     12016-09-06  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        Web Inspector: Cannot undo in breakpoint editor
     4        https://bugs.webkit.org/show_bug.cgi?id=152858
     5
     6        Reviewed by Brian Burg.
     7
     8        * UserInterface/Controllers/BreakpointPopoverController.js:
     9        (WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorBeforeChange):
     10        Since the breakpoint editor only allows a single line of JavaScript, it attempts to remove
     11        all "\n" characters.  During an "undo" action, this is not possible.
     12
    1132016-09-04  Joseph Pecoraro  <pecoraro@apple.com>
    214
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js

    r201620 r205499  
    240240    _conditionCodeMirrorBeforeChange(codeMirror, change)
    241241    {
    242         let newText = change.text.join("").replace(/\n/g, "");
    243         change.update(change.from, change.to, [newText]);
     242        if (change.update) {
     243            let newText = change.text.join("").replace(/\n/g, "");
     244            change.update(change.from, change.to, [newText]);
     245        }
     246
    244247        return true;
    245248    }
Note: See TracChangeset for help on using the changeset viewer.