NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar Harmageddon
Harmageddon
23 Jun 2020

Pull Request for Issue #29759.

Summary of Changes

When closing the "Add module" modal, the "Cancel" button inside the modal should be clicked. In the second step, i.e. after we have selected the type of the module to be added and see the module form, this works. But in the first step, there is no "Cancel" button inside the modal, which leads to a JavaScript error being logged in the browser console.

Testing Instructions

After applying the patch, you need to run npm ci to compile the JavaScript change.

  1. Login to the Joomla backend
  2. Open your browser's JavaScript console (usually F12 or Ctrl+Shift+K).
  3. At the bottom of the dashboard, click the Add module to the dashboard link
  4. Close the modal using the Close button in the footer. Look at the JavaScript console.
  5. Again, click "Add module". Select a module type.
  6. Close the modal using the Close button in the footer. Make sure that cancelling still works after applying this PR.
  7. Again, click "Add module". Select a module type.
  8. Enter the module information and click "Save and Close" to make sure that saving still works after applying this PR.

Actual result BEFORE applying this Pull Request

An error message is shown in the console:

content.querySelector(clickTarget) is null --- admin-add_module.min.js

Note: The modal still closes correctly, so no functionality is broken. But the error appears and we don't want that.

Expected result AFTER applying this Pull Request

No JS error should appear.

Documentation Changes Required

None

Ping @bembelimen as you implemented the original functionality and might see any caveats how this PR could break things.

avatar Harmageddon Harmageddon - open - 23 Jun 2020
avatar Harmageddon Harmageddon - change - 23 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jun 2020
Category JavaScript Repository NPM Change
avatar richard67 richard67 - test_item - 23 Jun 2020 - Tested successfully
avatar richard67
richard67 - comment - 23 Jun 2020

I have tested this item successfully on 862b9f3

It would have been helpful to mention that it needs to run npm for "compiling" the js. Not everybody knows that.


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

avatar Harmageddon Harmageddon - change - 23 Jun 2020
The description was changed
avatar Harmageddon Harmageddon - edited - 23 Jun 2020
avatar Harmageddon
Harmageddon - comment - 23 Jun 2020

It would have been helpful to mention that it needs to run npm for "compiling" the js. Not everybody knows that.

True, thank you! I added it to the description.

avatar chmst chmst - test_item - 23 Jun 2020 - Tested successfully
avatar chmst
chmst - comment - 23 Jun 2020

I have tested this item successfully on 862b9f3


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

avatar richard67 richard67 - change - 23 Jun 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 23 Jun 2020

RTC


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

avatar richard67 richard67 - change - 23 Jun 2020
Labels Added: ? ? NPM Resource Changed
avatar wilsonge wilsonge - change - 24 Jun 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-06-24 08:48:44
Closed_By wilsonge
Labels
avatar wilsonge wilsonge - close - 24 Jun 2020
avatar wilsonge wilsonge - merge - 24 Jun 2020
avatar wilsonge
wilsonge - comment - 24 Jun 2020

Thanks!

Add a Comment

Login with GitHub to post a comment