A "fix" that I've previously proposed is: Add <base target="_blank"> for the node comment on and override the preview form to use <form target="_self" ...> such that any "distractions" from previewing will open into another window, leaving the preview intact. That is about all that HTML / HTTP will allow. And I suspect that anyone who cares can probably implement that solution right now with custom CSS. I usually refuse to pretend to be a CSS expert so I'll let someone else fill in the details on how to do that and correct any HTML mistakes I've made above.

There are quite a few other tricks that would allow the last update that got submitted to be recoverable even if your browser's "Back" button doesn't work out (such failures are the minority in my experience but also happen far more often than makes sense), but that would lose updates made between the most recent submit and the "distraction". Having PerlMonks store each user's most-recent preview(s) is one of those that I've long called for.

Also, you could write JavaScript to do all manner of whacky things related to this. I suspect I'd find most of them to be worse cures than the disease, except perhaps that JavaScript doesn't work (by my choice or by limitation, sorry, "bug") in most browsers that I use. But if you like that stuff, the Free Nodelet is there for you.

I'd be for adding the target= "fix" to PerlMonks but we'd probably have to make it a user setting (default it on, however) as there are too many members with irrational hatred for target=. I'd also make comment on to, when it doesn't find a valid preview, load or link to site documentation that SiteDocClan can wordsmith explaining how you might have gotten there without a preview, why a new window may have just opened up, how to disable this protection, etc.

- tye        


In reply to Re: Possible PM bug? (CSS fix?) by tye
in thread Possible PM bug? by NateTut

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.