| Summary: | Advanced editing commands should respect TextView 'readonly' state | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Editor | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Silenio_Quarti |
| Version: | 2.0 | ||
| Target Milestone: | 2.0 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Simple testcase. Open editor page (edit.html) and replace "edit.html" with "readonly.html" in the URL. |
When testing with a TextView that has the 'readonly' == true option set, I found that certain text editing commands still modify the buffer. 1. Create an Editor or TextView that has the 'readonly' option enabled. For example change the embeddedEditor.html example like this (lines 34-40): > var textViewFactory = function() { > return new mTextView.TextView({ > parent: editorDomNode, > tabSize: 4, > readonly: true // read-only mode > }); > }; 2. Open the editor. Basic editing features are disabled (as expected). 3. Press Ctrl+D to delete a line. This actually succeeds and modifies the buffer. (not expected) IIRC the problematic commands are contributed by editorFeatures.js.