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

Fix tinyMCE modal close bug (again) #11048

Merged
merged 2 commits into from Jul 11, 2016
Merged

Fix tinyMCE modal close bug (again) #11048

merged 2 commits into from Jul 11, 2016

Conversation

dgrammatiko
Copy link
Contributor

@dgrammatiko dgrammatiko commented Jul 7, 2016

Pull Request for Issue #11047.

Testing Instructions

Follow these steps before and after applying this patch:

Add this snippet to administrator/components/com_content/models/forms/article.xml:

        <field name="extrafield" type="editor"
            label="An Extra Field" description="Whatever"
            filter="JComponentHelper::filterText" buttons="true" />

In administrator/components/com_content/views/article/tmpl/edit.php render the new field:

<?php echo $this->form->getInput('extrafield'); ?>

Go to any media form field (the "Images and links" tab works for this), select an image, and try to close the modal in any available manner (the insert/cancel buttons, the X icon, or clicking outside the modal).

Expected result

The modal is closed.

Actual result

The modal does not close. In the browser console is a "Uncaught RangeError: Maximum call stack size exceeded" message.

Note:

The problem is the way the scripts added to the document and consequently executed. Ideal solution will be to load and execute the overrides for jModalClose and SqueezeBox.close last but that is impossible with current Joomla API, therefore the ugly code in the behaviour.php.

@ggppdk
Copy link
Contributor

ggppdk commented Jul 7, 2016

I have tested this item ✅ successfully on 262a4ae

Tested both
#10774 (tested Joomla article form)
#11047 (tested form with 2 tinymce editors, and custom code to open modal for selecting image)

Also tested bootstrap modals (associations)
And in the case of creating dynamically extra textareas and attaching tinymce, then in this case too, no problems


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11048.

@ggppdk
Copy link
Contributor

ggppdk commented Jul 7, 2016

This should be in J3.6.0 !

@tranduyhung
Copy link
Contributor

I have tested this item ✅ successfully on 262a4ae

Thank you! The problem is fixed.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11048.

@zero-24
Copy link
Contributor

zero-24 commented Jul 8, 2016

RTC. Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11048.

@mbabker
Copy link
Contributor

mbabker commented Jul 8, 2016

I have tested this item ✅ successfully on 262a4ae


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11048.

@brianteeman brianteeman added the RTC This Pull Request is Ready To Commit label Jul 8, 2016
@brianteeman
Copy link
Contributor

Manually added rtc label

@brianteeman brianteeman added this to the Joomla 3.6.0 milestone Jul 10, 2016
@Kubik-Rubik
Copy link
Member

Thank you @dgt41 and testers!

@Kubik-Rubik Kubik-Rubik merged commit f7c7aa5 into joomla:staging Jul 11, 2016
@Kubik-Rubik Kubik-Rubik removed Release Blocker RTC This Pull Request is Ready To Commit labels Jul 11, 2016
@PhocaCz PhocaCz mentioned this pull request Jul 14, 2016
@mmefectiva
Copy link

Thanks for the info. I've tried to apply directly, but i don't find the exact node or place in the code to aply that.
Can'u explain where is the right place to put the snipet in article.xml and render the new field in edit.php? Thanks in advance.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11048.

@ggppdk
Copy link
Contributor

ggppdk commented Jul 27, 2016

@mmefectiva

You are looking at the wrong place, this was a fix for J3.6.0,

the fix for J3.6.1 is here:
#11097

@dgrammatiko dgrammatiko deleted the tinyMCEFIX branch October 11, 2016 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants