fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-10-13 04:21 am

[dw-free] After quoting, the text area does not receive focus

[commit: http://hg.dwscoalition.org/dw-free/rev/e3bd0ee13d78]

http://bugs.dwscoalition.org/show_bug.cgi?id=3009

Don't call this method twice; second time short-circuits because the first
time took care of the quoting, leaving us with the focus on the wrong
element.

Patch by Alicia, Erin, Josh, and Will of [personal profile] teamdestroyer.

Files modified:
  • cgi-bin/LJ/Talk.pm
--------------------------------------------------------------------------------
diff -r 0f5715b82c54 -r e3bd0ee13d78 cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm	Wed Oct 13 12:17:23 2010 +0800
+++ b/cgi-bin/LJ/Talk.pm	Wed Oct 13 12:21:07 2010 +0800
@@ -2054,7 +2054,7 @@ sub js_quote_button {
     my ( $element, $hidebutton ) = @_;
     return '' unless $element;
     my $button = LJ::ejs( '<input type="button" value="Quote"'
-                        . ' onmousedown="quote();" onclick="quote();" />' );
+                        . 'onclick="quote();" />' );
     $button = '' if $hidebutton;
     my $buttontext = "document.write('&nbsp;&nbsp;$button')";
     if ( $element eq 'body' ) {
--------------------------------------------------------------------------------