Project

General

Profile

Actions

Bug #79271

closed

Maximize Popup-Window (Add/Edit Link or RTE Image) doesn't work correctly

Added by Thomas Bauer-Philippi over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2017-01-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When I maximize the popup windows "Insert Image" or "Insert Link" in the RTE, a part of the window is outside of the viewport, because it's orientated on the top of the page.

When I'm at the very top of the page, maximizing the popup works correctly but after closing the window again, the whole content area of TYPO3 is locked so that I can't scroll down.

Tested in TYPO3 7.6.15 and Google Chrome 55.


Files

79271.patch (1.5 KB) 79271.patch Michel Tremblay, 2017-01-23 19:24
79271-2.patch (1.24 KB) 79271-2.patch Ayke Halder, 2017-02-28 18:47
Actions #1

Updated by Michel Tremblay about 7 years ago

I can confirm this problem.

The window position is "absolute" with "top: 0". So it depends on the parent windows current position. Switching to "position: fixed" solves this problems, but the content area is still "locked" after close...

Actions #2

Updated by Michel Tremblay about 7 years ago

Here is a patch working for me.

Tested on TYPO3 7.6.15 with Chrome 55 and Firefox 50.

Actions #3

Updated by Ayke Halder about 7 years ago

I can confirm this problem.

The popup window "Insert Link" is draggable. This behaviour does not work correctly anymore if [[79271.patch]] is applied. If the parent window is scrolled down, the patch makes the window jump to a new position after dragging.

Actions #4

Updated by Ayke Halder about 7 years ago

Here is a patch working for me.

Is it fine to change the behaviour of the BE-windows via CSS?
Is t3skin the right location to change the behaviour of the BE-windows?

Actions #5

Updated by Matthias Wieschke almost 7 years ago

We can also confirm this problem.

We implemented the posted css (79271.patch) fix in our backend css in our provider extension.

// Backend CSS Datei einbinden
if (TYPO3_MODE === 'BE') {
    $GLOBALS['TBE_STYLES']['skins'][$_EXTKEY]['stylesheetDirectories'][] = 'EXT:' . $_EXTKEY . '/Resources/Public/Css/backend/';
}

The JavaScript part (79271-2.patch) was a bit more tricky without touching the core files. We solved it by overriding the onClose function inside the ext_tables.php in our provider extension:

$pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
$pageRenderer->loadRequireJsModule(
    'TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
    'function(Plugin) {
        Plugin.prototype.onClose = function() {
            // Restore window before closing, to avoid residual classes on container
            this.dialog.restore();
             this.removeListeners();
             this.editor.focus();
             this.restoreSelection();    
         }
    }'
);

Best regards

Actions #6

Updated by Matthias Wieschke almost 7 years ago

// set in condition, otherwise amd problems will occur in FE
if (TYPO3_MODE === 'BE') {
    # fix for RTE popup bug https://forge.typo3.org/issues/79271
    $pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
    $pageRenderer->loadRequireJsModule(
        'TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
        'function(Plugin) {
        Plugin.prototype.onClose = function() {
            // Restore window before closing, to avoid residual classes on container
            this.dialog.restore();
             this.removeListeners();
             this.editor.focus();
             this.restoreSelection();    
         }
    }'
    );
}
Actions #7

Updated by Mathias Schreiber over 6 years ago

  • Status changed from New to Closed

HTMLArea is no longer supported by TYPO3.
You can open up new issues here https://github.com/FriendsOfTYPO3/rtehtmlarea.

Cheers
Mathias

Actions

Also available in: Atom PDF