views:

65

answers:

0

Using jQuery Lightweight RichTextEditor plugin. When I use a partial view (user control) on my page the textarea rendered retains input focus even though I'm explicitly setting focus on the page load (setting z-index doesn't work either):


    $(document).ready(function () {
        $("input:text:visible:first").focus();
    });

In View:

Html.RenderPartial("../UserControls/RichTextEditor");

In Partial View:


    $(document).ready(function () {

        var arr = $('.rte').rte({
            css: ['default.css'],
            controls_rte: rte_toolbar,
            controls_html: html_toolbar
        });
    });

Html.TextArea("DescriptionRTE", null, new { @class = "rte", @rows = "12", @cols = "60", @maxlength = "1000" } )

The partial view works in IE 8 but not FireFox 3.6 (input focus in in 1st control)

If I remove the partial view call and just use a Html.TextArea the first input gets focus in FF.

Html.TextArea("Description", null, new { @class = "rte", @rows = "12", @cols = "60", @maxlength = "1000" } )

Thanks...