codemirror / CodeMirror-v1

An editable-iframe based code editor in JavaScript. See https://github.com/marijnh/CodeMirror for the currently maintained version
http://codemirror.net/
Other
362 stars 63 forks source link

content does not show #55

Closed zulfiqarlangah closed 13 years ago

zulfiqarlangah commented 13 years ago

Content does not show when show hidden div. Here are steps:

  1. populate content in hidden div.
  2. apply codemirror on hidden div.
  3. show hidden div then it will not show content.

This scenerio can be apply on tabs.

marijnh commented 13 years ago

CodeMirror can not detect when it is being shown. You have to call the refresh() method to have it update itself in such a situation.

zulfiqarlangah commented 13 years ago

but when i call refresh method it show only 9 rows only. (9 lines only)

marijnh commented 13 years ago

Can you provide me with a minimal HTML page that demonstrates the problem?

marijnh commented 13 years ago

Oh, hold on, you are using CodeMirror 2, right? That's at https://github.com/marijnh/CodeMirror2

zulfiqarlangah commented 13 years ago

yes codemirror 2

somajs commented 12 years ago

still same problem here

marijnh commented 12 years ago

Please open an issue in the right repository, with a proper test case attached/linked.

somajs commented 12 years ago

I solved my problem with a setTimeout 20ms before calling refresh. I will reproduce in a simple example and open an issue. Cheers.

somajs commented 12 years ago

The display block was happening after the refresh call, in the right order everything works correctly. So there's no issue for me, sorry about that.