Monday, January 6, 2014

How to solve problem: tinymce steal focus in ie?

setup : function(ed) {
  ed.onLoadContent.add(function(ed, o) {
    var controlLoad = setTimeout(function() {
      if ($('.mceIframeContainer').size()==1) {
        $('form *:input[type!=hidden]:first').focus();
        clearTimeout(controlLoad);
      }
    }, 100);
  });
}

Code and working example link:
http://dl.dropboxusercontent.com/u/76169930/stackoverflow/question/10944450/tinymce/examples/no_contents_inside_textarea.html

Reference:
http://stackoverflow.com/questions/10944450/is-there-a-way-to-prevent-tinymce-from-auto-focusing-on-page-load


How to set default value for Auto-Implemented Properties in C#

Auto-Implemented Properties:
public string Name { get; set; }

Not you can not modify property directly, you could put default in class constructor.