Project

General

Profile

Actions

Bug #89173

closed

Notification actions broken after document change

Added by Andreas Kienast over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-09-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If a notification with actions is triggered within an iframe, the actions are broken after the iframe document changes. This is due to broken scopes when the notification is generated.

Following code is invoked in list_frame which renders a notification:

require(['TYPO3/CMS/Backend/Notification', 'TYPO3/CMS/Backend/ActionButton/DeferredAction'], function(Notification, DeferredAction) {
    Notification.info('Foo', 'Yadda yadda.', 0, [
        {
            label: 'Revert\u0020update',
            action: new DeferredAction(function() {
                return new Promise(resolve => setTimeout(() => { console.log('DONE'); resolve('foobar'); }, 1000));
            })
        }
    ]);
});

If e.g. another backend module is loaded, the click event in the notification gets lost and the callback cannot be executed anymore.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #89247: Revert Notification Action FactoryClosed2019-09-24

Actions
Actions #1

Updated by Gerrit Code Review over 4 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61706

Actions #2

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61706

Actions #3

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61706

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61706

Actions #5

Updated by Gerrit Code Review over 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61706

Actions #6

Updated by Gerrit Code Review over 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61706

Actions #7

Updated by Andreas Fernandez over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Andreas Kienast over 4 years ago

  • Description updated (diff)
Actions #9

Updated by Andreas Kienast over 4 years ago

  • Related to Bug #89247: Revert Notification Action Factory added
Actions #10

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF