~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/editor.js

  • Committer: David Coles
  • Date: 2010-07-29 10:51:30 UTC
  • Revision ID: coles.david@gmail.com-20100729105130-el3ut0zwisvgvthu
Fix issue with CodeMirror being wider than the screen and scrolling.

Seems like width: 100% + padding/margin causes the actual width to be more 
than 100%. Though if the CodeMirror element just auto-calculate the width it's 
fine. Also fixed similar issue with the <textbox>.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
 
115
115
    txt_elem.style.width = "100%";
116
116
    txt_elem.style.height = "100%";
 
117
    txt_elem.style.padding = "0";
117
118
    window.onbeforeunload = confirm_beforeunload;
118
119
 
119
120
    /* Always use CodeMirror (unless we find a good reason not to!) */
148
149
                    ],
149
150
            onChange: edit_text,
150
151
            indentUnit: 4,
 
152
            width: "auto", // Fixes issue with > 100% width
151
153
            tabMode: "spaces",
152
154
            lineNumbers: true,
153
155
            initCallback: function() {codemirror_language(language);},