Project

General

Profile

Actions

Bug #17785

closed

Multiple RTEs in Flexforms don't work properly

Added by Markus Kappe over 16 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-11-13
Due date:
% Done:

0%

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

Description

This situation: Two (or more) RTEs are located in different sheets in a flexform, you open the editing mask. Now you can only only enter text in the RTE in the active sheet. After switching to the other sheet you cannot focus on the input area. After saving, the page is rebuilt with the second sheet active, NOW you can enter text in this RTE, the RTE in the first sheet does not work any more.

Additionally the height of the sheet with the inactive RTE appears to be too little, the RTE overlaps other input fields.

When disabling the RTE, the input fields work out okay.

example flexform:

<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:as_questionaire/locallang_db.xml:tt_content.pi_flexform.sheetgeneral</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<questionText>
<TCEforms type="array">
<config type="array">
<type>text</type>
<cols>48</cols>
<rows>5</rows>
</config>
<label>LLL:EXT:as_questionaire/locallang_db.xml:tt_content.pi_flexform.questionText</label>
<defaultExtras>richtext[*]:rte_transform[mode=ts_css]</defaultExtras>
</TCEforms>
</questionText>
<answerType>
<TCEforms>
<label>LLL:EXT:as_questionaire/locallang_db.xml:tt_content.pi_flexform.answerType</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:as_questionaire/locallang_db.xml:tt_content.pi_flexform.answerType.I.1</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">LLL:EXT:as_questionaire/locallang_db.xml:tt_content.pi_flexform.answerType.I.2</numIndex>
<numIndex index="1">2</numIndex>
</numIndex>
</items>
<minitems>1</minitems>
<maxitems>1</maxitems>
<size>1</size>
</config>
</TCEforms>
</answerType>
</el>
</ROOT>
</sDEF>
<display>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:as_questionaire/locallang_db.xml:tt_content.pi_flexform.textAnswer</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<answerText>
<TCEforms type="array">
<config type="array">
<type>text</type>
<cols>48</cols>
<rows>5</rows>
</config>
<label>LLL:EXT:as_questionaire/locallang_db.xml:tt_content.pi_flexform.answerText</label>
<defaultExtras>richtext[*]:rte_transform[mode=ts_css]</defaultExtras>
</TCEforms>
</answerText>
</el>
</ROOT>
</display>
</sheets>
</T3DataStructure>

(issue imported from #M6706)


Files

T3X_rtetest-0_0_0-z-200806271719.t3x (6.52 KB) T3X_rtetest-0_0_0-z-200806271719.t3x Administrator Admin, 2008-06-27 17:16

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #23256: htmlARea RTE: RTE overlaps following form element within flexform tabsClosedStanislas Rolland2010-07-23

Actions
Related to TYPO3 Core - Bug #18210: htmlarea_rte in Flexform with multiple sheets and firefox not correct workingClosedStanislas Rolland2008-02-14

Actions
Actions #1

Updated by Markus Kappe over 16 years ago

This problem also occurs with a single RTE on a sheet that is not active when the page ist loaded.

Actions #2

Updated by Christian Kuhn almost 16 years ago

I can reproduce this bug in 4.2.1.

I attached a simple test extension based on your flexform.

Maybe someone takes a look at this.

Actions #3

Updated by Stanislas Rolland almost 16 years ago

Using the test extension, I cannot reproduce the first part of this issue neither in 4.1.8-dev, nor in 4.3.0-dev using Firefox 3.

However, the layout is indeed awkward, but in different ways, in 4.1.8-dev and 4.3.0-dev.

To make sure that the first part of the issue is not related to incorrect installation, please delete all files in typo3temp/rtehtmlarea and all files with names starting with "rtehtmlarea_" in directory typo3temp.

Actions #4

Updated by Christian Kuhn almost 16 years ago

Thanks Stan.

Part 1 (the focus issue) happens only in ff 2, I also can not reproduce this in ff 3, nor in Opera 9.50.

I can reproduce part1 with ff 2.0.0.14, on latest trunk and 4-2 branch: If I select the other tab after loading, click into the textarea and type in some text, then the "Quick find" bar in ff2 is opened with the typed text.

Actions #5

Updated by Stanislas Rolland almost 16 years ago

I think that this is due to the fact that the flexform tabs are not included in TCEform->getDynNestedStack

Actions #6

Updated by Jan-Henrik Hempel over 14 years ago

In version 4.2.6 and 4.2.8 the problem that the RTE overlaps other input fields with in flexforms still appears.
Saving problems or anything like that, we counld not reproduce.

Actions #7

Updated by Juergen Deisenroth over 14 years ago

I tried to understand what produce the bug and analysed the javascript code. There are many objects rendered with the attribut "display:none" and they have no height and width when calling the function sizeIframe in htmlarea.js. For this reason it is not possible to calculate the tool- and statusbar dimensions in auto mode.
At a be extension with multiple rtes in tabs i could fix this with a string replace for "DTM_activate" and an own function named "DTM_activate" calling the original function and sizeIframe. Because sizeIframe makes the rte smaller with every call, I switch from auto to fix dimension and the function is only executed once for each tab.
I used this code snippet at the extension:

$this->doc->JScode .=
// ... DynTabMenu-Kode mit modifiziertem Namen der Aktivierungsfunktion laden
str_replace('DTM_activate', 'DTM_activateOrig', $this->doc->getDynTabMenuJScode())
// ... Eingene Aktivierungsfunktion definieren, welche die Originalfunktion aufruft und
// einmalig Größenkorrekturen für alle RTEs vornimmt.
.'<script language="javascript" type="text/javascript">'
.'function DTM_activate(idBase,index,doToogle) {'
// ... Originalfunktion ausführen
.'DTM_activateOrig(idBase,index,doToogle);'
// ... Größenkorrekturen für alle bereits angelegten RTEs ausführen.
// (Die RTEs werden am Skriptende angelegt, weshalb bei der erstmaligen Ausführung am
// Skriptanfang nur das Objekt mit den Versionsinformationen existiert).
.'if( typeof(RTEarea) != "undefined" ) {'
.'try {'
// Die Namen aller Objekteigenschaften analysieren: init, initEditor, 0, data[tx_....
.'for(var eigenschaft in RTEarea) {'
// Objektfunktionen und Versionsinformationen ignorieren, ferner muss mit der
// Eigenschaft ein Editor verknüpft sein und die Höhe muss automatisch bestimmt
// werden.
.'if( eigenschaft != "0"'
.' && typeof(RTEarea[eigenschaft]) "object"'
.' && typeof(RTEarea[eigenschaft].editor) "object"'
.' && RTEarea[eigenschaft].editor.config.height == "auto"'
.' ) {'
// auto-Modus durch fixe Angabe deaktivieren, weil der RTE sonst durch wiederholte
// Berechnungen immer kleiner wird.
.'RTEarea[eigenschaft].editor.config.height = '
.'RTEarea[eigenschaft].editor._textArea.style.height;'
// Dimensionen berechnen.
.'RTEarea[eigenschaft].editor.sizeIframe(2);'
.'}'
.'}'
.'} catch(err) {'
.'}'
.'}'
.'}'
.'</script>'
;

Actions #8

Updated by Stanislas Rolland over 13 years ago

The overlap issue was fixed in TYPO3 4.3 alpha2.

Actions #9

Updated by Stanislas Rolland over 13 years ago

This issue is fixed in TYPO3 4.3 branch.

Actions #10

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF