Aug. 28th, 2019

github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/master
Home: https://github.com/dreamwidth/dw-free
Commit: e5febf62d597216027a4e245b0a12757432e6188
https://github.com/dreamwidth/dw-free/commit/e5febf62d597216027a4e245b0a12757432e6188
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2019-08-28 (Wed, 28 Aug 2019)

Changed paths:
M cgi-bin/LJ/Web.pm
M htdocs/js/jquery.quickreply.js
M views/journal/quickreply.tt

Log Message:
-----------
QR: Prevent preview from insta-posting, and re-enable on reading/recent pages

This reverts commit b9ba2db6dfe0623e745d4f5cf4eff1d0014d226b, after fixing the
bug that made me remove the preview button from the quick-er form.

With this, the quickreply forms are now a single unified critter. No more
quick-er reply, I mean it this time.


Commit: 605a816242e1c639d93cf7dbb1ad975f50c48472
https://github.com/dreamwidth/dw-free/commit/605a816242e1c639d93cf7dbb1ad975f50c48472
Author: Nick Fagerlund <nick.fagerlund@gmail.com>
Date: 2019-08-28 (Wed, 28 Aug 2019)

Changed paths:
M htdocs/js/jquery.quickreply.js
M htdocs/js/jquery.talkform.js
M views/journal/talkform.tt

Log Message:
-----------
Talkform: Fix preview-submits-for-real bug

This was masked by my original typo on that JS that disables the form buttons on
submit. Once the typo was fixed, the preview button started insta-posting. 😱

A quick investigation revealed that some part of our Perl-land form handling
causes disabled submit buttons to have a falsy value. And it turns out the
quickreply already had a workaround for that! It just didn't have any comments
explaining _why_ it was doing that workaround, so I didn't know to reproduce it.

So I fixed the talkform bug the same way, and added some comments explaining the
workarounds.

Note that if you have JS disabled, the talkform preview button works as expected
-- it starts out with the correct input name. If JS is enabled enough to dummy
out the name, it's also enabled enough to send the correct value in the hidden
input.


Compare: https://github.com/dreamwidth/dw-free/compare/795cd6b39882...605a816242e1
Page generated Mar. 28th, 2026 01:37 pm
Powered by Dreamwidth Studios