Review 10.4 Abandoned

72903[BUGFIX] Load navigation frame src after transformations are done

Andreas Kienast CR 0 V 0 Easy +21 −3 updated 01/08/22, 13:01

Commit message

Some newer browsers (reported were Safari and Firefox) are not able to
load the file tree when invoking the module the first time. Testing
around revealed it's an issue as long the navigation frame is not
visible to the client.

It seems these browsers refuse to load the iframe src as long the
element is not "ready". To solve this issue, the `transitionend` event
is used to determine when the outer scaffold has fully updated before
changing the iframe's URL.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 1114

  1. Andreas Kienast uploaded patch set 1 01/07/22, 12:46

  2. Andreas Kienast updated the commit message in patch set 2 01/07/22, 12:49

  3. core-ci voted on patch set 1 V +1 01/07/22, 12:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21765

  4. core-ci voted on patch set 2 V +1 01/07/22, 12:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21766

  5. Oli Bartsch voted on patch set 2 V +1 CR +1 01/07/22, 13:17

  6. Benjamin Franzke commented on patch set 2 01/07/22, 13:20

    NavigationContainer.ts:88

    I don't know but should we guard this by a setTimeout? Like: Set `.src` if transitionend didn't happen in XY seconds? Basically as in: https://github.com/twbs/bootstrap/blob/e8f4cba9a05fc06fc6f7f11883b9c82e2027bff0/js/src/util/index.js#L239
  7. Andreas Kienast commented on patch set 2 CR -1 01/07/22, 13:59

    on it

    NavigationContainer.ts:88 Reply

    fine with me
  8. Benjamin Franzke commented on patch set 2 CR -1 01/07/22, 14:04

    NavigationContainer.ts:88 Reply

    Hm, also the transitionend we receive here is from <div class="bar" role="bar" - which is provided by nprogress. I guess that means we basically have a random timeout here, but don't really wait for any transition that actually affects the iframe. Becuase, as far as I see, there is no transition for the class="scaffold" element, nor for any element that is parent of the navigation frame, right? This means the navigation iframe is actually slowed-down until the content frame is loaded (nprogress ended). I unfortunately can not reproduce the issue in firefox under linux. Did you with Windows or MacOS? I wonder if a slight delay, e.g. using `requestAnimationFrame()` also fixes the issue?
  9. Andreas Kienast uploaded patch set 3 01/07/22, 14:12

  10. Andreas Kienast commented on patch set 3 01/07/22, 14:16

    NavigationContainer.ts:88 Reply

    I was able to reproduce it with Firefox on Ubuntu. The important thing is to open the Filelist module right after logging in into the backend, before any navigation frame is opened. Also, make sure you're testing this in 10.4 ;)
  11. core-ci voted on patch set 3 V +1 01/07/22, 14:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21775

  12. Andreas Kienast commented on patch set 3 01/07/22, 14:30

    NavigationContainer.ts:88 Reply

    Unfortunately, requestAnimationFrame() isn't sufficient here in all cases. Plus, the setTimeout() workaround also fails then.
  13. Benjamin Franzke commented on patch set 3 01/08/22, 09:31

    NavigationContainer.ts:88 Reply Unresolved

    Yea, I tested with 10.4 and Firefox 95 under linux and couldn't reproduce. Anyway, Firefox 95 on windows 10 failed for me as well. And I think this is actually a race caused by our ModuleMenu code that cals both, setUrl() and refresh(). This causes Firefox to abort the request, therefore `about:blank` is kept. Please see the following patch for another way to fix this (works for me with Firefox on Windows 10): https://review.typo3.org/c/Packages/TYPO3.CMS/+/72932
  14. Andreas Kienast abandoned the change 01/08/22, 13:01