Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Save without losing my place?
Bloke wrote #302582:
This commit introduces AJAX saving of the Styles panel. Please report any findings with the latest dev branch and, if it’s acceptable, I’ll roll it out across other panels.
That is kinda unfortunate – it is the one panel I never use…
I gave it a brief test though, with a 2 line css, and it works, as far as I can tell. The contents of the textarea is saved, the focus remains on the textarea – I’ll assume the scroll position is kept as well.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Save without losing my place?
phiw13 wrote #302726:
I’ll assume the scroll position is kept as well.
Yes it is. I’ll roll it out to the other panels this week.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Save without losing my place?
Yahoo! I’m planning on testing this ASAP. This is going to make a big difference on my quality of life.
Meawhile, can I get a what what for automatic tag completion when I type </ ? (This list does not end until you’ve mostly reimplemented Sublime Text in that text box.)
Yes, I have tried turning it off and on.
Offline
Re: Save without losing my place?
Bloke wrote #302733:
Yes it is. I’ll roll it out to the other panels this week.
Now that it has landed for all 3 panels, I could take it for a spin in a more realistic environment. Everything works nicely.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Save without losing my place?
phiw13 wrote #302839:
Everything works nicely.
Brill, thanks for testing. Glad it works.
I’ve uncovered one niggle on the Forms panel. If you change a Form to an unused type and save, the Form doesn’t appear in the list. This is because the AJAX is injected into the twisty container one at a time so if the new twisty isn’t in the list to begin with, it’s not added until a full page refresh occurs. Same in reverse when changing the type away from the last item in a group.
Unfortunately, doing things the other way round (writing the entire side panel out as a single block) has two consequences upon save:
- The open/closed state of twisty panels is not remembered.
- The multi-select checkbox feature (shift-click) is lost.
That’s down to the way the handlers are registered. Working with Oleg on a solution1.
1 Alright, full disclosure: I’ve asked Oleg to fix it because he knows more about this stuff than I do.
Last edited by Bloke (2016-11-14 18:20:18)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Save without losing my place?
Bloke wrote #302852:
I’ve uncovered one niggle on the Forms panel. […]
Ack. That is one thing I didn’t test – my playground has forms of all types… Done some post spring autumn storm cleaning, and I can reproduce that.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Save without losing my place?
Just a quick note that the latest 4.7dev has a floating ‘Save’ button in Hive themes, and no autosize in Classic theme. This should negate any problems with having to scroll up/down the page to save an article mid-edit.
Offline
Re: Save without losing my place?
It looks like some layout problem was introduced in a recent commit: the browser (FF53 W7) looses Undo option (in Body and Excerpt) on async article save.
Offline
Re: Save without losing my place?
etc wrote #306676:
It looks like some layout problem was introduced in a recent commit: the browser (FF53 W7) looses
Undooption (in Body and Excerpt) on async article save.
You mean you cannot undo what you just typed after saving the article ?
If so, that works fine here with Safari 10 and Firefox 55 and 52ESR.
EDIT: hold on, I should amend that.
- it works fine if I use the
rah_knotsextension, then the keyboard shortcut (cmd+z) to undo or use theedit menu > undoor the context menu (thetextareais the element with focus). - it fails if (after typing) I use the mouse and press the
Savebutton then either press the undo keyboard shortcut or use the Edit menu (textarealooses focus). - it works when, after saving and pressing the
Savebutton, I use the context menu inside the textarea (textarearegains focus as I click in it).
No idea if this is the normal Firefox behaviour or not, or if anything changed recently as I actually never use Firefox except for testing purposes.
Last edited by phiw13 (2017-08-20 00:44:53)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Save without losing my place?
I mean undo after save (your point 2). Don’t know if it’s a FF or jQuery bug, but if I replace the surrounding <span class="author"> with <div class="author"> in article_partial_author, it works again. Phil, is it ok this way?
Offline
Re: Save without losing my place?
Yes that is ok, both div and span have no semantic value so it’s ok to have empty containers of either of those.
Offline
Re: Save without losing my place?
etc wrote #306685:
I mean undo after save (your point 2). Don’t know if it’s a FF or jQuery bug, but if I replace the surrounding
<span class="author">with<div class="author">inarticle_partial_author, it works again. Phil, is it ok this way?
FWIW, that never worked on Firefox Mac (txp4.6 and a 4.7-dev from before the commit you allude to. Patching an up-to-date 4.7-dev the way you suggest doesn’t make it work.
(Undo after saving does work in all situations with Safari and Opera (Blink)).
PS – <div /> is marginally “better“ in this case given its default rendering as a block.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Save without losing my place?
OK, the latest commit changes that span to a div. Let us know if that solves the issue.
Offline
#44 2017-08-21 11:22:20
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: Save without losing my place?
phiw13 wrote #306677:
- it fails if (after typing) I use the mouse and press the
Savebutton then either press the undo keyboard shortcut or use the Edit menu (textarealooses focus).
I think that’s the typical (MacOS) behaviour in every application: Only the field that has focus is the one whose contents you can undo/redo. It should undo/redo again when the field in question re-gains focus.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Save without losing my place?
uli wrote #306694:
I think that’s the typical (MacOS) behaviour in every application: Only the field that has focus is the one whose contents you can undo/redo. It should undo/redo again when the field in question re-gains focus.
Nope, not in this case – Safari and Opera (Blink I assume Chrome does the same) can undo the whole time (all 3 different bullet points in my list, but particularly point 2). In Safari at least, the Undo stack applies to window context.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline