In Bartik theme when you try to quick edit any image field in wide screen, it won't allow you to edit it it don't show the js form to edit the image field. The problem is with Bartik theme when viewing site on desktop resolution only, it works fine when on mobile screen. See the attached screenshot after clicking on the image field for quick edit.

Steps to reproduce

On a fresh install of Drupal 9.x with the standard profile, you can recreate the issue as follows:

  1. Create new Article content with text in the body field and an image in the image field
  2. When viewing the article, enable Quick edit
  3. Mouse over the image and notice that Quick edit chooses the body field over the image field
CommentFileSizeAuthor
#74 2783277--after--patch--pic.png39.71 KBvikashsoni
#74 2783277--before--patch--pic.png39.37 KBvikashsoni
#70 after-patch.png223.06 KBMadhu kumar
#70 before-patch.png248.13 KBMadhu kumar
#69 after-patch.mp45.2 MBBhumikaVarshney
#69 before-patch.png191.98 KBBhumikaVarshney
#68 interdiff.2783277.64-68.txt432 bytesabhisekmazumdar
#68 2783277-68.patch412 bytesabhisekmazumdar
#66 Screenshot 2021-01-19 at 11.44.35 AM.png332.72 KBlokeshsahu
#65 Screenshot 2021-01-19 at 10.57.17 AM.png376.88 KBlokeshsahu
#64 Bartik-theme-dont-allow-to-quick-edit-images-2783277-64.patch413 bytesmarkandrewsutton
#64 Screen Shot 2021-01-18 at 4.09.11 PM.png332.46 KBmarkandrewsutton
#63 2783277-after_patch.gif19.78 MBAbhijith S
#63 2783277-before.gif10.41 MBAbhijith S
#62 2783277-62.patch412 bytesdjsagar
#62 interdiff_61-62.txt482 bytesdjsagar
#61 2783277-61.patch452 bytesVishalghyv
#60 After-patch-applied.png331.64 KBdjsagar
#60 video-aftre-patch.mp49.19 MBdjsagar
#60 2783277-60.patch434 bytesdjsagar
#60 Seven-before-patch.png230.84 KBdjsagar
#60 Olivero-before-patch.png661.85 KBdjsagar
#60 Claro-before-patch.png258.3 KBdjsagar
#60 bartik-before-patch.png395.37 KBdjsagar
#56 Screen Shot 2020-08-06 at 10.55.58 PM.png249.94 KBKristen Pol
#56 Screen Shot 2020-08-06 at 10.55.16 PM.png250.91 KBKristen Pol
#56 Screen Shot 2020-08-06 at 10.49.30 PM.png751.61 KBKristen Pol
#56 Screen Shot 2020-08-06 at 10.29.21 PM.png1.02 MBKristen Pol
#56 Screen Shot 2020-08-06 at 10.28.47 PM.png1.25 MBKristen Pol
#55 Screen Shot 2020-07-29 at 3.52.53 PM.png94.36 KBKristen Pol
#55 Screen Shot 2020-07-29 at 3.43.09 PM.png102.73 KBKristen Pol
#55 Screen Shot 2020-07-29 at 3.41.32 PM.png854.03 KBKristen Pol
#55 Screen Shot 2020-07-29 at 1.44.14 PM.png530.52 KBKristen Pol
#55 Screen Shot 2020-07-29 at 1.39.16 PM.png499.12 KBKristen Pol
#54 Screenshot 2020-07-28 at 7.36.10 AM.png196.59 KBsamiullah
#53 fix-body-over-image.patch790 bytesAdsyy
#41 Screen Shot 2018-02-02 at 15.46.28.png536.19 KBteemuaro
#40 fix-body-wrapping-2783277-40.patch1.56 KBoakulm
#37 better-comments-2783277-37.patch1.46 KBoakulm
#35 Screen Shot 2018-01-25 at 9.38.41 PM.png861.46 KBKristen Pol
#35 Screen Shot 2018-01-25 at 9.38.01 PM.png582.33 KBKristen Pol
#35 Screen Shot 2018-01-25 at 9.36.52 PM.png836.28 KBKristen Pol
#35 Screen Shot 2018-01-25 at 9.33.12 PM.png1.35 MBKristen Pol
#31 z-index-change-2783277-31.patch1.52 KBoakulm
#30 explain-z-index-2783277-30.patch1.62 KBoakulm
#29 Screen Shot 2018-01-15 at 13.01.14.png24.41 KBoakulm
#27 drupal-review-issue-queue.png114.85 KBMaheshwaran.j
#14 Bartik-theme-dont-allow-to-quick-edit-images-2783277-13.patch1.38 KBoakulm
#12 Screen Shot 2017-02-20 at 5.21.38 PM.png511.5 KBcilefen
#7 Bartik-theme-dont-allow-to-quick-edit-images-2783277-7.patch446 bytesoakulm
#2 Bartik-theme-dont-allow-to-quick-edit-images-2783277-1.patch430 bytespuneetsharma
Screen Shot 2016-08-12 at 5.25.41 PM.png995.99 KBpuneetsharma
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

puneetsharma created an issue. See original summary.

puneetsharma’s picture

puneetsharma’s picture

Status: Active » Needs review
puneetsharma’s picture

Assigned: puneetsharma » Unassigned
puneetsharma’s picture

Priority: Normal » Major

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

oakulm’s picture

Proposed solution is not good. If we remove float from the image field we remove the intended functionality from theme. Attached is my solution to the problem.

Also moved this to 8.4.x-dev because it is still present in latest version.

oakulm’s picture

Version: 8.3.x-dev » 8.4.x-dev
aviseksingh’s picture

@oakulm's patch makes more sense.

aviseksingh’s picture

tested for the patch by @oakulm. Works as intended.

vidhatanand’s picture

Status: Needs review » Reviewed & tested by the community

+1

cilefen’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
Issue tags: -theme, -Bartik, -Drupal 8.x, -quickedit, -image field
FileSize
511.5 KB

The #7 patch breaks the clear on comments.

oakulm’s picture

Assigned: Unassigned » oakulm
oakulm’s picture

Attached is better solution for this.

Z-index value is based on the fact that Toolbar has z-index: 501 so we are trying to keep images below Toolbar.

Also I have added clear for comments as they are breaking quick edit if no body text is present.

oakulm’s picture

Status: Needs work » Needs review
jussielo’s picture

I tested the patch -13 to be a working one. As Bartik doesn't have comments wrapper and node links templates this seems to be a reasonable solution.

oakulm’s picture

Status: Needs review » Reviewed & tested by the community
Wim Leers’s picture

Title: Bartik theme don't allow to quick edit images » Bartik theme doesn't allow to quick edit images
Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/themes/bartik/css/components/field.css
    @@ -46,10 +46,14 @@
    +    z-index: 480;
    ...
    +    z-index: 480;
    

    Let's document the rationale behind using this particular z-index.

  2. +++ b/core/themes/bartik/css/components/node.css
    @@ -54,6 +54,7 @@
     .node__links {
       text-align: right; /* LTR */
       font-size: 0.93em;
    +  clear: both;
     }
    

    Please provide a screenshot showing that this change does not break node links.

darrindeal’s picture

Issue tags: +Baltimore2017
darrindeal’s picture

Issue tags: +Triaged for D8 major current state

I triaged this and found that this is still an issue and the latest patch still applies.

oakulm’s picture

darrindeal, please provide screen for #18?

cilefen’s picture

@darrindeal I am going over the issues analyzed at the Baltimore triage in order to assign credit. I would like to give you credit for the work done, but I can't tell whether or not all steps of the triage were completed by reading the comments. We like to see documented steps (even if brief). Here are some made-up examples of documented triage steps:

  • I tested the steps to reproduce and they did (or did not) work (so I am tagging it "Needs issue summary update").
  • I searched for duplicate issues but could not find any.
  • I checked the issue summary and it is accurate and up-to-date.
  • Etc...

Thank you!

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

oakulm’s picture

Status: Needs work » Needs review
oakulm’s picture

Assigned: oakulm » Unassigned
Issue tags: +Novice

Please review as this should be fine.

Maheshwaran.j’s picture

Assigned: Unassigned » Maheshwaran.j
Maheshwaran.j’s picture

Assigned: Maheshwaran.j » Unassigned
Status: Needs review » Reviewed & tested by the community
FileSize
114.85 KB

hi @oakulm

Your patch applies cleanly and quick edit works even if the image is there. Please see the screenshot

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

The feedback from #18 haven't been addressed yet.

oakulm’s picture

Status: Needs work » Needs review
FileSize
24.41 KB

This is first time me writing comments on Core CSS. Is the formatting ok?

Also there is a screen cap for node links.
Node links

oakulm’s picture

oakulm’s picture

Sorry to keep changing this but after some more testing z-index of 400 something was too much as images jumped over quick edit forms. Now z-index is so that it should be below quickedit forms and Toolbar.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Maheshwaran.j’s picture

Issue tags: +Needs reroll
jofitz’s picture

Issue tags: -Needs reroll

Does not require re-roll - current patch (#31) still applies and passes tests.

Kristen Pol’s picture

Thanks for the patch. I tested this with the article content type. When I first tried it, the image was above the body field and I could not get the quick edit to show up for the image. When I moved the image below the body field, I was able to get the quick edit to show up for the image field. I tried with 2 different image sizes and it didn't make a difference. See screenshots below. I tested on Chrome 63. I didn't see any issue with the node links. As for the CSS comments, I normally see them at the end and inline but these are long comments. Also, although I do see some core comments start with "We", I would avoid it.

+++ b/core/themes/bartik/css/components/field.css
@@ -47,10 +47,16 @@
+    /* We are keeping images below Toolbar and below Quickedit form. */
+    z-index: 99;

Perhaps simplifying to something like:

z-index: 99; /* Keep below Toolbar and Quickedit */

Kristen Pol’s picture

Status: Needs review » Needs work
oakulm’s picture

Status: Needs work » Needs review
FileSize
1.46 KB

Thanks for the review! And here you go with better comments.

Kristen Pol’s picture

Status: Needs review » Needs work

Thanks, @oakulm. An interdiff would be handy. It looks like you only changed the comments. If so, there is still the issue that the image is not editable when it's positioned above the body field so I'm marking this back to needs work.

oakulm’s picture

Yes you are correct. I missed your comment about the above the body field. I will take a look

oakulm’s picture

Status: Needs work » Needs review
FileSize
1.56 KB

Here you go. So I had to raise the z-index back up again to prevent body from wrapping over the image. The problem is with quickedit form that has fixed z-index and it has to be modified in Bartik to fix this issue.

teemuaro’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
536.19 KB

Patch applies cleanly, and fixes the issue when the image is above the body field, see attachment.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 40: fix-body-wrapping-2783277-40.patch, failed testing. View results

loopduplicate’s picture

Status: Needs work » Needs review

Setting this back to needs review and triggerering a retest. I think something was wrong with the testbot because the test passes for me locally.

loopduplicate’s picture

Status: Needs review » Reviewed & tested by the community

Since the tests are all passing now, I'm changing the status of this issue back to RTBC.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

I don't seem to be able to reproduce the bug. Could someone update the issue summary to include the specific steps required for reproducing this?

+++ b/core/themes/bartik/css/components/comments.css
@@ -10,6 +10,9 @@
+.comment-wrapper {
+  clear: both;
+}

+++ b/core/themes/bartik/css/components/node.css
@@ -54,6 +54,7 @@
+  clear: both;

We should open a separate issue for this since this seems unrelated to the bug reported here.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

mradcliffe’s picture

I think this is still a Novice issue. Per @laurii's comments, the issue needs clear steps to reproduce in Drupal 9.1.x, and the issue summary updated.

evilehk’s picture

On a fresh install of Drupal 9.x with the standard profile, you can recreate the issue as follows:

  1. Create new Article content with text in the body field and in image
  2. When viewing the article, enable Quick edit
  3. Mouse over the image and notice that quickedit chooses the body field over the image field

While the patch does remedy this problem for Bartik, I believe the solution should be in the quickedit module to properly handle inline field elements within another field. This issue is a duplicate of [#2697500].

Kristen Pol’s picture

Issue summary: View changes

Updated the issue summary with the steps to reproduce from #51. Still leaving the tag in case more clarification is needed.

Adsyy’s picture

Status: Needs work » Needs review
FileSize
790 bytes

Hi, i'm a bit new but try to help, i've read issue and removed "clear: both;" property because @laurii suggested it should be another issue in my attached patch.
Should we finish this issue first and then open a global one to handle inline field elements within another field in quickedit module as @evilehk suggested ?

samiullah’s picture

Tested the patch manually
We are able to use quick edit for editing images added via image field and also images in body field

If more review is needed then that can be done otherwise this can be moved to RTBC

Kristen Pol’s picture

I was testing again without a patch, both with separate fields (body+image) and with an image in the body field, and noticed something odd. When I first did the quick edit, then the quick edit controls positioning was off. But, if I exited quick edit and then opened it again, the positioning seemed ok. Example:

First time clicking quick edit

Second time clicking quick edit

This was after clicking the X to get out of it. This was reproducible if I reloaded the page and started again.

I also tested the patch from #53 and unfortunately had issues.

Text and image both in body field

Quick edit doesn't let me get to the text (which is above the image). Closing with the X and trying again didn't help.

Separated image and body fields

Note I'm testing on simplytest.me and there is an issue showing images in image fields so that is compounding things. But, I still think there is something weird going on because I can't see the body text to be able to edit that. Though, it's possible that it's just because simplytest.me isn't showing the image due to a bug in their code: #3162126: Image styles either aren't generated or can't be downloaded.

Kristen Pol’s picture

Title: Bartik theme doesn't allow to quick edit images » Bartik theme doesn't allow to quick edit image fields
Status: Needs review » Needs work
FileSize
1.25 MB
1.02 MB
751.61 KB
250.91 KB
249.94 KB

Moving back to needs work after more testing.

1) Tested with separate image field and body text and, although I could replace the image, the quickedit controls are hidden for both the image and the body text. See screenshots.

2) Tested with image within the body text and I'm able to change the image but not able to edit the body text above the image. See screenshots.

3) Tested use case 1 with Claro and Seven just to make sure they work ok there and they do.

4) Tested use case 2 with Claro and Seven just to make sure they work ok there and they also do not work. All themes had a consistent behavior of hiding the text above the image. See screenshots.

5) Since the issue summary is focused on image fields then I'll check if 2/4 are covered by a different issue.

Bartik with separate image field - Initial image

Bartik with separate image field - After replacing image

Bartik with image in body field - can't edit text above image

Claro with image in body field - can't edit text above image

Seven with image in body field - can't edit text above image

Kristen Pol’s picture

I found the issue related to the problem in #56 when image is in the body field. But, it's a general problem and isn't related to the fact there is an image in the body field.

#2350535: Quick Edit toolbar does not float up above content on first invocation, it covers the text in the Body field

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

mradcliffe’s picture

Issue tags: +Europe2020

I performed Novice Triage on this issue. I am leaving the Novice tag on this issue only because I think that the issue summary needs to be updated. It would be great if someone could update the Steps to reproduce section with some of the excellent manual testing done by @Kristen Pol above. Also add what the proposed resolution is to address the bug in the patch.

After updating the issue summary, if we think that there is a clear path forward for addressing the one issue from the review in #56, then leave the Novice tag. Otherwise remove the Novice tag.

djsagar’s picture

Status: Needs work » Needs review
FileSize
395.37 KB
258.3 KB
661.85 KB
230.84 KB
434 bytes
9.19 MB
331.64 KB

Hi all,

As per the issue i create patch regarding this issue please review and gave feedback.

Thanks!

Vishalghyv’s picture

FileSize
452 bytes

Changed the order for CSS,
The patch was small so didn't make interdiff file

djsagar’s picture

FileSize
482 bytes
412 bytes

Hi all,

i am adding new patch with interdiff file and also got my mistake what i done.

Please review and give feedback.

Thanks!

Abhijith S’s picture

FileSize
10.41 MB
19.78 MB

Applied patch #62 and it works fine.Now the image field allows quickedit. Adding screenshots bellow.

Before patch:
before

After patch:
after

RTBC +1

markandrewsutton’s picture

Patch in #62 is very close, but I found a situation where the edit popup gets hidden behind the image like so:

Quickedit screenshot

Attached patch fixes this issue by using a slightly "lower" z-index.

lokeshsahu’s picture

@markandrewsutton i did not found any situation where the popup gets overlapped by the image. Added a screenshot for ref.

lokeshsahu’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
332.72 KB

Applied patch #62 and it works fine. Now the image field allows quick edit
Adding screenshot for ref.
RTBC +1

larowlan’s picture

Status: Reviewed & tested by the community » Needs work

This is failing CSS linting, see https://www.drupal.org/pift-ci-job/1973192

abhisekmazumdar’s picture

Status: Needs work » Needs review
FileSize
412 bytes
432 bytes

Removed the whitespace. Kindly review my patch.

BhumikaVarshney’s picture

FileSize
191.98 KB
5.2 MB

Applied patch #68 and it works fine. Now the image field allows quick edit
Adding screenshot for ref and video.
RTBC +1

Madhu kumar’s picture

FileSize
248.13 KB
223.06 KB

Patch #68 applied cleanly and it is working well.
Before patch:
before-patch
after patch:
after-patch

Madhu kumar’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Novice +Needs tests

@Wim Leers asked for a comment explaining why the z-index is the particular value. This was present before #60 but then disappeared. It's important to add a comment documenting z-index values to have us maintain them. Also I think this is testable via WebDriverTestBase - and given the fragility of z-indexes I think it is worth doing.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vikashsoni’s picture

Applied patch #62 successfully and looks good for me
for ref sharing screenshot....

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

xjm’s picture

Issue tags: -Triaged for D8 major current state

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

pameeela’s picture

Project: Drupal core » Bartik
Version: 10.1.x-dev » 1.0.2
Component: Bartik theme » Functionality

Moving to contrib since this is specific to Bartik, which was removed from core in Drupal 10.