Fixed Submitting "Insert code" form does not reset code editor styling

TickTackk

Well-known member
Affected version
2.2
Steps to reproduce:
  1. Copy a sample code in clipboard
  2. Click on the vertical "..."
  3. Click on the "Code" bb code icon
  4. Insert content into the code editor
  5. Select "PHP" as language and before the styling is applied click on "Continue"

Edit: Updated steps to reproduce
 
Last edited:

Chris D

XenForo developer
Staff member
Which browser and OS is this reproducible on because I'm unable to and the code is there to clear the values on submit:
JavaScript:
$code.val('');
$type.val('');

We only reset the form on submit so if you close the overlay manually the values are not reset though that is semi intentional to avoid losing content.

Is it possible at some point that you closed the overlay rather than submitting it?
 

TickTackk

Well-known member
Windows 10 20H1 and Chromedge v83.0.478.58

Is it possible at some point that you closed the overlay rather than submitting it?
Quite sure I did not close the overlay. I occasionally face the same issue on XF 2.1 installations as well.

Edit: Okay I see the issue. If you select the language and before it loads the styling you submit the form and then you reopen the form you should be able to replicate it.
 
Last edited:

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.0 Beta 4).

Change log:
Force the language switcher to operate whenever the dialog is opened
There may be a delay before changes are rolled out to the XenForo Community.
 
Top