A display bug
See original GitHub issuewhen use code mirror in a tabs Put code mirror control in second tab Initialize some data the code mirror control will be display a blank, until the mouse click (image 1) when click code mirror,will be display the content ,but line number display an error (image 2) The following is the demo code:
<ul>
<li onclick="SelectTab(0)">Tab 1</li>
<li onclick="SelectTab(1)">Tab 2</li>
</ul>
<div class="tab-content" id="tab-content-1">
This is a tab content 1
</div>
<div class="tab-content" id="tab-content-2" style="display:none">
<textarea code-style type="text" id="txtEditor" ng-model="Html"></textarea>
</div>
<script type="text/javascript">
var SelectTab=function(index){
if (index===0){
$("#tab-content-1").show();
$("#tab-content-2").hide();
}else{
$("#tab-content-2").show();
$("#tab-content-1").hide();
}
}
$(function(){
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("txtEditor"),
{
mode:"javascript",
lineNumbers: true,
theme:"mbo" ,
value:"var data = new datetime();"
});
});
</script>
before click:
after click:
please check it ! Any question please let me know! thanks
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Bug Display - Etsy
Check out our bug display selection for the very best in unique or custom, handmade pieces from our insects shops.
Read more >210 Bug display ideas | insect art, insects, beautiful bugs
Jun 19, 2019 - Explore Sarah Sebby's board "Bug display" on Pinterest. See more ideas about insect art, insects, beautiful bugs.
Read more >Display | Bug Hunter
Display. There are a variety of reasons people collect, preserve and ... Alternatively, people display insects or insect parts as art and decorations....
Read more >Is this a display issue or any bug? - OnePlus Community
I have some issues in my display when it's full brightness. I could see some dark patches in black screen. is this a...
Read more >Troubleshoot screen flickering in Windows - Microsoft Support
To determine whether a display driver or app is causing the problem, check to see if Task Manager flickers. Then, based on that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tiny-v Something worked for me:
@jianle
myCodeMirror.setSize('100%', '100%');
this worked for me, thanks.