Opened 15 years ago
Last modified 22 months ago
#12769 new defect (bug)
Disappearing posts/pages (in quickedit mode)
Reported by: | catahac | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | minor | Version: | 2.9.2 |
Component: | Quick/Bulk Edit | Keywords: | has-patch needs-testing |
Focuses: | ui, javascript | Cc: |
Description
Steps to reproduce:
- Quickedit a post.
- Click save and instanly click quick-edit on another post.
When the ajax-request completes the first quick-edited post will disappear from the posts table. This is only a display bug.
Attachments (2)
Change History (15)
#2
@
14 years ago
- Keywords needs-patch added; quick edit quick-edit disappear removed
- Milestone changed from Awaiting Review to Future Release
#3
@
14 years ago
- Version changed from 2.9.2 to 3.1
This is still an issue as of 3.1, any updates as to when this might get addressed?
#4
follow-up:
↓ 5
@
14 years ago
- Version changed from 3.1 to 2.9.2
Please do not change the version on tickets. The version is used to track when a bug was introduced/identified.
#5
in reply to:
↑ 4
@
14 years ago
Sorry, I didn't know that. Thanks for the info.
Please do not change the version on tickets. The version is used to track when a bug was introduced/identified.
#6
@
10 years ago
This still occurs also its really hard to trigger.
To reproduce:
- Edit something on the quick view of a post (but do not click save)
- Move cursor over the quick edit of another post.
- Hit enter (which triggers the JS to submit the quick edit) and instantly after you do that click on the quick edit button on the second post your cursor was already on.
Incredibly hard to do unless you're really trying to do this, but still reproducible nonetheless
#7
@
10 years ago
I think the problem is caused the removal and appending of the new row returned by the AJAX request, although I'm not 100% sure (it might have something to do with either the ID getting messed up, or which rows are being removed, or the revert() happening at the beginning of the edit, or something else!?)
Anyway, the old code was
$(inlineEditPost.what+id).remove(); // Remove the original (now hidden) post row $('#edit-'+id).before(r).remove(); // before the editor row, add the new HTML returned by the save AJAX request, then remove the edit row $(inlineEditPost.what+id).hide().fadeIn(); // with the new returned and added to the DOM, hide it then fade in.
My solution was to use the original row, and not remove it at all. Simply inject the needed HTML back into it. This solves bug.
$('#edit-'+id).remove(); // Remove the edit row $(inlineEditPost.what+id).empty().append($(r).html()).fadeIn(); // Inject the needed HTML the original post row and fade in
The r
returned by the AJAX call contains the whole row as HTML, I'm not sure if this returned HTML is used elsewhere, so i left that alone. The $(r).html()
simply gets the child elements which we need to inject back into the original row.
#8
@
10 years ago
- Keywords has-patch dev-feedback added; needs-patch removed
I'm also unsure how the core team handles minified versions, do they minify everyone prior to release? Anyone 12769.without-min-version.diff is the same diff but without me touching the .min version.
#9
@
9 years ago
- Keywords reporter-feedback added; dev-feedback removed
Some things have changed in the Quick Edit form in the last months: buttons are now buttons, JavaScript events, etc. Couldn't reproduce anymore, but maybe I'm missing something. @chriscct7 would you mind to double check and try to reproduce when you get a chance? :)
#10
@
9 years ago
Nevermind, was finally able to reproduce. Very unlikely to happen though, unless you're doing it intentionally :) What I'd do:
- on Quick Edit link click
- return if a previous AJAX request has not completed
Investigating also #25696 which maybe requires a similar solution.
#11
@
9 years ago
- Focuses ui javascript added
- Keywords reporter-feedback removed
- Milestone changed from Future Release to 4.5
See #25696 for a proposed solution. Note: this happens also on Categories, Tags, and Comments.
#12
@
9 years ago
- Milestone changed from 4.5 to Future Release
No changes in the last 8 weeks, so I'm bumping from 4.5.
@afercia If you think you have a fix, feel free to re-milestone.
Just experienced the same. Can confirm this for 3.0 trunk. It's a bug in the frontend JS logic. Defect by Design.