Firepad text not shown until first click

96 views Asked by At

I have embedded Fire Pad on my website. Initially I had problems with textbox being hidden but based on this post, I was able to make it work.

Everything seems to be working but one part. I need to click on the text area for text to be loaded for the first time. Ie. when page loads, the text area is visible but empty. I click in that text area and the document appears.

DOM View

I can see text is available in the DOM it is just hidden until I focus on that area. I assume it is still related to my DOM structure and CSS.

I tried to fire focus and click events.. No luck. Any help is appreciated.

2

There are 2 answers

0
Alekos On BEST ANSWER

Ok, here us what worked for me:

codeMirror.focus();
codeMirror.setCursor(codeMirror.lineCount(), 0)

0
Chun Yin On

Try adding init(); to your

$(document).ready(function(){
}