Bläddra i källkod

fix: set readonly to false by default

Gerald 8 år sedan
förälder
incheckning
33d079782e
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/common/ui/code.vue

+ 1 - 1
src/common/ui/code.vue

@@ -96,7 +96,7 @@ export default {
   methods: {
   methods: {
     onReady(cm) {
     onReady(cm) {
       this.cm = cm;
       this.cm = cm;
-      if (this.readonly != null) cm.setOption('readOnly', true);
+      if (this.readonly) cm.setOption('readOnly', true);
       cm.state.commands = this.commands;
       cm.state.commands = this.commands;
       cm.setOption('extraKeys', {
       cm.setOption('extraKeys', {
         Esc: 'cancel',
         Esc: 'cancel',