Core: Issue when writing a post: ctrl + z issue

Created on 18 May 2019  路  9Comments  路  Source: flarum/core

Bug Report

Current Behavior
Cannot underdone more than one time message errors with CTRL + Z

Sometime as staff but also as member ( admin and user side ) you need to write a long post.
If you do errors and use ctrl + z for try to go back you can only resume one time...

For example if now i write 5 sentences here (1,2,3,4,5) than need to undone the 5 and 4 and 3 i cannot do with ctrl + z just sentence 5 will be removed.

first sentence
second sentence
third sentence
fourth sentence
fifth sentence

Now i press ctrl + z i should be able to undone different changes... but is allowed just one.

This can be a big issue as you can done mistakes and you can be unable to solve.
I believe this should be reported on GitHub.

*Current Behavior *

Issue when writing a post: ctrl + z issue

Steps to Reproduce
Go to the editor and write a message with 5 different sentence one for row.
try to undo the last two or three sentence with ctrl + z , you are able to undone just the last changes done. If you are unable to do many undo you can loose work on a long text where you do errors and need undo more than one step.

Expected Behavior
Press ctrl + z and undo the last action, press again and undo another previous action, etc.

Environment

Flarum core 0.1.0-beta.8.1
PHP version: 7.3.X
Loaded extensions: Core, date, libxml, pcre, dom, fileinfo, filter, hash, json, SPL, bz2, posix, Reflection, session, SimpleXML, standard, xml, xmlreader, xmlwriter, bcmath, openssl, calendar, ctype, curl, dba, mbstring, ftp, gd, gettext, gmp, iconv, imap, intl, ldap, exif, zlib, pcntl, PDO, pdo_sqlite, shmop, soap, sockets, sqlite3, sysvsem, sysvshm, tidy, tokenizer, wddx, xmlrpc, xsl, zip, Phar, mysqlnd, mysqli, pdo_mysql, ionCube Loader, Zend OPcache
+------------------------------+-----------------+--------+
| Flarum Extensions            |                 |        |
+------------------------------+-----------------+--------+
| ID                           | Version         | Commit |
+------------------------------+-----------------+--------+
| flarum-approval              | v0.1.0-beta.8   |        |
| flarum-bbcode                | v0.1.0-beta.8   |        |
| flarum-emoji                 | v0.1.0-beta.8   |        |
| flarum-lang-english          | v0.1.0-beta.8   |        |
| flarum-flags                 | v0.1.0-beta.8.1 |        |
| flarum-likes                 | v0.1.0-beta.8.1 |        |
| flarum-lock                  | v0.1.0-beta.8   |        |
| flarum-markdown              | v0.1.0-beta.8   |        |
| flarum-mentions              | v0.1.0-beta.8.1 |        |
| flarum-statistics            | v0.1.0-beta.8   |        |
| flarum-sticky                | v0.1.0-beta.8   |        |
| flarum-subscriptions         | v0.1.0-beta.8   |        |
| flarum-suspend               | v0.1.0-beta.8   |        |
| flarum-tags                  | v0.1.0-beta.8.2 |        |
| flarum-pusher                | v0.1.0-beta.8.1 |        |
| nearata-lang-italian         | v0.1.0-beta.8.2 |        |
| flagrow-upload               | 0.7.1           |        |
| fof-user-bio                 | 0.1.2           |        |
| fof-default-user-preferences | 0.1.0           |        |
| fof-links                    | 0.2.0           |        |
| fof-recaptcha                | 0.1.0           |        |
| flarum-akismet               | v0.1.0-beta.8   |        |
| flagrow-terms                | 0.3.1           |        |
| flarum-auth-facebook         | v0.1.0-beta.8   |        |
| flarum-auth-github           | v0.1.0-beta.8   |        |
| flarum-auth-twitter          | v0.1.0-beta.8   |        |
+------------------------------+-----------------+--------+
Base URL: https://community.marcoborla.it

https://discuss.flarum.org/d/20044-issue-when-writing-a-post-ctrl-z-issue

Can be reproduced also on the official Flarum community.

typbug

All 9 comments

I'm not entirely sure but isn't this the responsibility of the browser or os?

I'm not entirely sure but isn't this the responsibility of the browser or os?

Is not the browser i am trying on other forums (not Flarum) and is working as expected... so i can undone more than the last edit done. The issue is present only on Flarum.

Maybe be related to the two-way bindings of Mithril that could interfere with the browser cancel feature ?

Can someone test how it behaves in other browsers ? Do we see the same issue ?

@clarkwinkelmann tested now and it's the same with Chrome

I can confirm this behavior as well. It appears that a linebreak cuts the ability to ctrl-z undo before the linebreak. Anything on the same line/paragraph has full ctrl-z/shift-ctrl-z capabilities afaict.

Could this be caused by the markdown toolbar?

Hi @franzliedke , maybe from some test seems can be the markdown tried with and without and seems ctrl + z is working better without.

If https://github.com/jahudka/mdarea/issues/4 is implemented, that should resolve this issue.

Hi, I'm the developer of mdarea, just thought I'd chime in to let you guys know I'm aware of the issue - I won't go into too much detail here, but it appears it could be done - read the comments of the issue @askvortsov1 mentioned for more info, esp. this one - but it might increase the package size considerably because it's not trivial to implement. If that's not an issue in Flarum's context then I'll be happy to give it a go when I find the time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jordanjay29 picture jordanjay29  路  3Comments

luceos picture luceos  路  4Comments

tobyzerner picture tobyzerner  路  4Comments

jordanjay29 picture jordanjay29  路  3Comments

datitisev picture datitisev  路  3Comments