Title: [147451] trunk/Source/WebCore
Revision
147451
Author
[email protected]
Date
2013-04-02 10:49:32 -0700 (Tue, 02 Apr 2013)

Log Message

Web Inspector: [CodeMirror] do not show cursor in read-only mode
https://bugs.webkit.org/show_bug.cgi?id=113793

Patch by Andrey Lushnikov <[email protected]> on 2013-04-02
Reviewed by Alexander Pavlov.

No new tests.

Pass "nocursor" option to CodeMirror's "readonly" setting.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.setReadOnly):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (147450 => 147451)


--- trunk/Source/WebCore/ChangeLog	2013-04-02 17:47:37 UTC (rev 147450)
+++ trunk/Source/WebCore/ChangeLog	2013-04-02 17:49:32 UTC (rev 147451)
@@ -1,3 +1,17 @@
+2013-04-02  Andrey Lushnikov  <[email protected]>
+
+        Web Inspector: [CodeMirror] do not show cursor in read-only mode
+        https://bugs.webkit.org/show_bug.cgi?id=113793
+
+        Reviewed by Alexander Pavlov.
+
+        No new tests.
+
+        Pass "nocursor" option to CodeMirror's "readonly" setting.
+
+        * inspector/front-end/CodeMirrorTextEditor.js:
+        (WebInspector.CodeMirrorTextEditor.prototype.setReadOnly):
+
 2013-04-02  Nate Chapin  <[email protected]>
 
         Unreviewed, rolling out r147402.

Modified: trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js (147450 => 147451)


--- trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js	2013-04-02 17:47:37 UTC (rev 147450)
+++ trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js	2013-04-02 17:49:32 UTC (rev 147451)
@@ -193,7 +193,7 @@
      */
     setReadOnly: function(readOnly)
     {
-        this._codeMirror.setOption("readOnly", readOnly);
+        this._codeMirror.setOption("readOnly", readOnly ? "nocursor" : false);
     },
 
     /**
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to