Bad bad bug: When editing/creating an article in VE, if I use "Insert code block", and enter some text, clicking outside of the form discards all the work I just did.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Use dialog for editing block level syntax highlights | mediawiki/extensions/SyntaxHighlight_GeSHi | master | +343 -97 |
Related Objects
Event Timeline
@Jdforrester-WMF, this can't be "by design", because it causes significant unexpected behavior and loss of data. If i am an editor, and while editing i insert a code block, and spent half an hour typing up the text inside that code block, I should NOT be able to accidentally delete all my work! I should NOT be able to accidentally discard it without warning by simply clicking outside of the box! This is not an acceptable or expected behavior of the editor!
This is the correct behaviour for an inspector which we probably shouldn't change (again). It is the correct behaviour for editing links, for example.
One solution would be to use dialogs for more complex nodes such as these, however then you woud lose the live preview.
Ultimately the syntax highligter should probably be a dialog which loads a code editor (Ace, CodeMirror, ...), removing the need for a preview (T49742).
I think the ultimate premise here is incorrect -- from the user's perspective, anything that allows data changes, especially in a text field, should preserve the data at all costs. It sounds like "inspector" is something to view but not change the data - in which case it should never allow editing.
No, the act of clicking away from the inspector is dismissive, not constructive like clicking done. This behaviour is identical to google docs and other editors which use inspectors.
I am not exactly sure here - when editing a link, i would guess the click out should save the change, especially if i was live-previewing it while typing.
@Esanders, I just looked, you are correct that gdocs does that - I was more used to the gmail - which has a dialog box and not an inspector for the link edits. I guess we should look at it as "one line" vs ("multi-line" or several "one liners"), and whenever there are more than a single line change possible, do it as a dialog
Change 247474 had a related patch set uploaded (by Esanders):
WIP Use Ace editor when available
https://gerrit.wikimedia.org/r/247474
Change 247567 had a related patch set uploaded (by Esanders):
Use dialog for editing block level syntax highlights
https://gerrit.wikimedia.org/r/247567
Change 247567 merged by jenkins-bot:
Use dialog for editing block level syntax highlights
https://gerrit.wikimedia.org/r/247567