fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2012-01-25 12:48 pm

[dw-free] Make choosing random icon a button

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

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

Use input type=button instead of button, to prevent submits in some
browsers. Also input type=button is the preferred now.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/Talk.pm
--------------------------------------------------------------------------------
diff -r a2c860e74f7d -r 4236ce44537e cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm	Mon Jan 23 11:37:12 2012 +0000
+++ b/cgi-bin/LJ/Talk.pm	Wed Jan 25 20:50:16 2012 +0800
@@ -2121,7 +2121,7 @@
         }
 
         # random icon button - hidden for non-JS
-        $ret .= "<button class='ljhidden' id='randomicon'>" . BML::ml('/talkpost.bml.userpic.random2') ."</button>";
+        $ret .= "<input type='button' class='ljhidden' id='randomicon' value='" . BML::ml('/talkpost.bml.userpic.random2') . "'/>" ;
 
         $ret .= LJ::help_icon_html("userpics", " ");
     }
--------------------------------------------------------------------------------
ninetydegrees: Art: self-portrait (Default)

[personal profile] ninetydegrees 2012-01-25 05:02 pm (UTC)(link)
Hadn't realized until today how much I loved this. Not because I'm actually using the button but because Quick Reply looks so much neater now. *bg* Thanks!