Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickering on Media manager files after latest update #4601

Closed
haralake opened this issue Sep 6, 2019 · 52 comments
Closed

Flickering on Media manager files after latest update #4601

haralake opened this issue Sep 6, 2019 · 52 comments

Comments

@haralake
Copy link

haralake commented Sep 6, 2019

  • OctoberCMS Build: ### 458
  • PHP Version: 7.3
  • Database Engine: MySQL
  • Plugins Installed:

Description:

Flickering on Media manager files. If you open Media manager folder with a lot of files and try to scroll down to the last you will see flickering, and you are unable to select any of the files. Something i noticed is that if you resize browser window it stops flickering and is working fine. You can see this issue bellow:

Screenshot

Steps To Reproduce:

Just open Media manager
Create folder and upload many images
Try to scroll down to the latest
Flickering!

@bennothommo
Copy link
Contributor

This has been reported by a few users on Slack, so bumping up the priority.

@haralake
Copy link
Author

haralake commented Sep 6, 2019

Thank you @bennothommo . If you have a lot files is impossible to work with media manager so the only quick solution for now is to downgrade.

@roojai
Copy link

roojai commented Sep 6, 2019

I'm having this issue on a number of sites - whats the best way to downgrade?

@bennothommo
Copy link
Contributor

@roojai If you upgraded via Composer, you can change the October dependencies in composer.json in your root folder to the following:

        "october/rain": "1.0.455",
        "october/system": "1.0.455",
        "october/backend": "1.0.455",
        "october/cms": "1.0.455",

@roojai
Copy link

roojai commented Sep 6, 2019

Thanks @bennothommo but not really sure how to do that.

I use 1pilot to manage multiple site upgrades, or I just use the backend plugin updates button.

The "resize browser" fix works well for now

@panakour
Copy link
Contributor

panakour commented Sep 6, 2019

Peek 2019-09-06 10-56

@w20k
Copy link
Contributor

w20k commented Sep 6, 2019

@bennothommo will look at it as well!

@bennothommo bennothommo added this to the v1.0.459 milestone Sep 6, 2019
@acasar
Copy link
Contributor

acasar commented Sep 6, 2019

Same issue here... I thought it was only me :)

@w20k w20k self-assigned this Sep 6, 2019
@w20k
Copy link
Contributor

w20k commented Sep 6, 2019

@bennothommo I know what component causes the issue, will dig dipper.
scrollpad (.scrollpad-scrollbar > .drag-handler`) -> is the culprit here.

@LukeTowers
Copy link
Contributor

@w20k in case it helps I've seen this happen on Facebook too just now, except much more aggressively and vertically instead of horizontally on the latest chrome.

@pavelmgn
Copy link
Contributor

pavelmgn commented Sep 7, 2019

temporary fix

div[data-control="media-manager"] .control-scrollpad {
	position: relative;
    max-height: 500px;
    overflow: hidden;
}

@bennothommo
Copy link
Contributor

bennothommo commented Sep 7, 2019

I personally have been unable to replicate this on Linux running Chrome 76 and Firefox 69.

Is this happening on a particular browser or OS? Is it happening just for the Media tab in the main menu, or the media finder when adding images to a widget? Is there a specific amount of files it needs before the bug manifests?

@pavelmgn
Copy link
Contributor

pavelmgn commented Sep 7, 2019

@bennothommo i have windows 10, chrome ver 76.0.3809.132 (Official build), (64 bit). The problem is relevant wherever the media window is used.

@roojai
Copy link

roojai commented Sep 7, 2019

Im on the same set up as @pavelmgn. @bennothommo I have noticed that the problem does not occur in media manager itself, but when you access media through a form from another plugin. I find it only effects the lower part of the page (more than 7 files needed in list mode, 4 rows needed in small grid mode, and effects can be seen in second row in large grid mode)

@bennothommo
Copy link
Contributor

@pavelmgn @roojai would either of you be willing to test it with smooth scrolling disabled in your browser and see if it makes a difference?

@ghost
Copy link

ghost commented Sep 7, 2019

I use Google Canary and I know the last few months I have seen loads of scrolling bugs and even reported it to Google.

I would be interested to know if you install Google Canary, found here: https://www.google.com/chrome/canary/

And see if the issue still continues? As Google Canary V78 has fixed the scrolling bugs (most of them).

And this issue I saw a few months back when Google Canary was using V76.


Timeline of Chrome errors with scrolling I've seen was like this:

V76 - 100% scrolling errors.
V77 - 50% scrolling errors fixed.
V78 - 90% scrolling errors fixed.


It's even worse on Edge browser, see here: #4417

But I closed that issue down as the Edge project is dead and they switched over to using Chromium now.


[edit] My point is that you need test the issue to see if it's to do with October or Chrome or both.

(I didn't bother reporting it weeks ago as I saw it was to do with Chrome).

@pavelmgn
Copy link
Contributor

pavelmgn commented Sep 8, 2019

@bennothommo no difference =( With smooth scrolling disabled, the same thing happens.

@roojai
Copy link

roojai commented Sep 8, 2019

Seems more Chrome related than OctoberCMS, I am having the same problem on a site that is on build 447

@bennothommo
Copy link
Contributor

@roojai I'm leaning towards that too, given what I've read about these types of issues with Chrome (I still haven't been able to replicate myself). Just to narrow this issue down further, can you test it with Firefox and let me know if that exhibits the same issue?

@ghost
Copy link

ghost commented Sep 8, 2019

@bennothommo When I reported this issue to Chrome 2 months ago the Chrome team told me it's an issue with the "hardware acceleration" inside Chrome. Maybe people can try disabling it.

Not sure if this was the tag:

chrome://flags/#disable-accelerated-video-decode

p.s. for me it didn't work on a windows 10. But others said it worked on a MAC.

[edit] The solution decided upon was basically the Chrome hardware acceleration and the windows one had an issue working together. When I saw the gifs here, they look exactly the same as what I saw 2 months ago.

@bennothommo
Copy link
Contributor

Thanks @ayumihamsaki. @roojai @pavelmgn, could you try @ayumihamsaki's suggestion and see if it makes a difference?

@Grawl
Copy link

Grawl commented Sep 11, 2019

@pavelmgn yep, it's a problem with this workaround. You can try to set position: sticky; top : 0 for [data-control="preview-sidebar"]. (I just tried this but with no luck)

@vangar02
Copy link

We've got a lot of October sites and clients are complaining. But it is indeed a chrome issue.

There's a quick fix. Just paste this in your Settings > Customize Back-End > Styles tab.

body div[data-control="media-manager"] .control-scrollpad{position:static}

When chrome fixes this bug, just remove it again.

@Grawl
Copy link

Grawl commented Sep 11, 2019

I just set fixed height for scroll wrapper and got October's scroll behaviour without flickering.

So, full workaround looks like this:

modules/backend/widgets/mediamanager/assets/css/mediamanager.css

-div[data-control="media-manager"] .control-scrollpad{position:absolute;left:0;top:0}
-div[data-control="media-manager"] .scroll-wrapper{position:relative}
+div[data-control="media-manager"] .scroll-wrapper{height:calc(100vh - 300px)}

Or you can add following stylesheet to Settings › Customize Back-End › Styles:

div[data-control="media-manager"] .control-scrollpad{position:static}
div[data-control="media-manager"] .scroll-wrapper{height:calc(100vh - 300px)}

@roojai
Copy link

roojai commented Sep 11, 2019

body div[data-control="media-manager"] .control-scrollpad{position:static}

Is working for me ok.

div[data-control="media-manager"] .control-scrollpad{position:static}
div[data-control="media-manager"] .scroll-wrapper{height:calc(100vh - 300px)}

Gives me a blank page in media manager

@Grawl
Copy link

Grawl commented Sep 11, 2019

Please tell me what browser you are using to get this issue

@roojai
Copy link

roojai commented Sep 11, 2019

Sorry, I am using chrome Version 76.0.3809.132 (Official Build) (64-bit) on windows

Farrow pushed a commit to ConnectingElement/backend that referenced this issue Sep 11, 2019
@iboved
Copy link

iboved commented Sep 11, 2019

@bennothommo I have just updated my Google Chrome to 77.0.3865.75 version. And I still have the same problem.

@Farrow
Copy link
Contributor

Farrow commented Sep 11, 2019

Thanks to Grawl for the CSS needed to fix the issue. The backend updates didn't work for me, but the mediamanager.css file updates did.

As a note for others though, you'll also need to update modules/backend/widgets/mediamanager/assets/less/mediamanager.less

if you use the October less compiler (like we do for our deployment process). If you don't update the less file then if you run "php artisan october:util compile [assets|less]" then the mediamanger.css file will be overwritten.

-    .control-scrollpad {
-       position: absolute;
-        left: 0;
-        top: 0;
-    }

    .scroll-wrapper {
-        position: relative;
+        height: calc(~"100vh - 300px");
    }

Note that the calc has a ~ in there so that the less compiler doesn't try to evaluate the expression at build time. Without it you end up with the wrong css.

@LukeTowers
Copy link
Contributor

@iboved

I have just updated my Google Chrome to 77.0.3865.75 version. And I still have the same problem.

It's reported fixed in Chrome 78.

@Grawl
Copy link

Grawl commented Sep 18, 2019

Latest stable is 77

@LukeTowers
Copy link
Contributor

@Grawl please try updating to 78 and see if it has been fixed.

@w20k w20k removed their assignment Sep 22, 2019
@ghost
Copy link

ghost commented Sep 22, 2019

Ok PR submitted.

There were two issues causing the error, these are as follows:

  1. The issue was the position using absolute and not sticky, which caused a forever scrolling action. Position: sticky has fixed this issue.

  2. The issue here was because the scrollbar javascript in the media manager needs to have the right sidebar displayed and the css was using display: none, switching it over to opacity: 0 allows the javascript to scroll the container. If you set the display to none you will see the data-visible attribute keep trying to set it to true and the screen starts flickering! The right sidebar in the media manager is the place where the media file previews are displayed.

Please can some people test out my PR and shout at me - when needed, pr is here: #4632

@Grawl
Copy link

Grawl commented Sep 23, 2019

Just checked for updates and it's still 77

@SebastiaanKloos
Copy link
Contributor

Chrome update 78 fixed it for me

@haralake
Copy link
Author

I confirm that chrome v.78 has fixed this issue

@LukeTowers
Copy link
Contributor

Great, will leave it open until 460 is released at least

@bennothommo bennothommo modified the milestones: v1.0.459, v1.0.460 Oct 29, 2019
@github-actions
Copy link

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.

@SebastiaanKloos
Copy link
Contributor

@LukeTowers Issue still fixed with 78.0.3904.108

@summercms
Copy link
Contributor

⚠️Warning ⚠️ As of December 2019 there is an issue in the Firefox browser with the media manager, see video of the error here: https://youtu.be/Rlq9R3WIDfQ

If you or your clients use Firefox, I suggest adding this commit to fix it: 1e449c8

🔥🔥🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests