Title: [205499] trunk/Source/WebInspectorUI
Revision
205499
Author
[email protected]
Date
2016-09-06 12:56:37 -0700 (Tue, 06 Sep 2016)

Log Message

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

Patch by Devin Rousso <[email protected]> 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.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (205498 => 205499)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-09-06 18:55:12 UTC (rev 205498)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-09-06 19:56:37 UTC (rev 205499)
@@ -1,3 +1,15 @@
+2016-09-06  Devin Rousso  <[email protected]>
+
+        Web Inspector: Cannot undo in breakpoint editor
+        https://bugs.webkit.org/show_bug.cgi?id=152858
+
+        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.
+
 2016-09-04  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Enable and enforce some recommended and stylistic ESLint rules

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js (205498 => 205499)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js	2016-09-06 18:55:12 UTC (rev 205498)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js	2016-09-06 19:56:37 UTC (rev 205499)
@@ -239,8 +239,11 @@
 
     _conditionCodeMirrorBeforeChange(codeMirror, change)
     {
-        let newText = change.text.join("").replace(/\n/g, "");
-        change.update(change.from, change.to, [newText]);
+        if (change.update) {
+            let newText = change.text.join("").replace(/\n/g, "");
+            change.update(change.from, change.to, [newText]);
+        }
+
         return true;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to