Committer: dnikolaev
LJSUP-9184: Submit button on Update.bml doesn't work in Opera (turbo)U trunk/cgi-bin/LJ/Widget/EntryForm.pm
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/EntryForm.pm 2011-07-12 03:49:28 UTC (rev 19461) +++ trunk/cgi-bin/LJ/Widget/EntryForm.pm 2011-07-12 03:58:11 UTC (rev 19462) @@ -1077,10 +1077,10 @@ my $preview_tabindex = $self->tabindex; my $preview = qq{ <input - type='button' - value='$BML::ML{'entryform.preview'}' - onclick='entryPreview(this.form)' - tabindex='$preview_tabindex' + type="button" + value="$BML::ML{'entryform.preview'}" + onclick="entryPreview(this.form)" + tabindex="$preview_tabindex" /> }; $preview =~ s/\s+/ /sg; # JS doesn't like newlines in string @@ -1089,7 +1089,9 @@ unless ($opts->{'disabled_save'}) { $out .= $self->wrap_js(qq{ if (document.getElementById) { - document.write("$preview "); + setTimeout( function() { + jQuery( '$preview' ).prependTo( '#entryform-spellcheck-wrapper' ); + }, 0 ); } }); }