User tests: Successful: Unsuccessful:
Pull Request for Issue #35377.
Add if
to check and respond only when the button is not disabled
please see issue
Don't forget to build JS npm run build:js
Disabled buttons respond
Disabled buttons do not respond
No
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
Labels |
Added:
?
NPM Resource Changed
|
Hi Brian, is it not working or any other issue
Try it and you will see
still broken
I see that I have to be more explicit - I was hoping that you would see at least one of the errors yourself.
- In this PR you are reverting a recent change in the language string. As a result, if you actually try this code on the current repository then the messages are not translated.
Updated Thank you
Actually, I have not pulled latest changes from Github
- As you have correctly disabled the ability to click on a disabled button then the condition that would cause the message to select one version can never be met. If that was intended then the code can be greatly simplified.
When we select more than one version to restore or preview, then this message will help Please select one version.
Similarly, when we select one or three instead of two to compare, alert will be displayed Please select two versions.
@rjharishabh , I tested and now the disabled buttons no longer do anything but the error you got previously regarding "Please select one version" does not appear. Also the disabled icon does not seem to show by the cursor at all.
but the error you got previously regarding "Please select one version" does not appear.
Select two versions to preview, then this message will be displayed.
I've updated the description with a video.
@rjharishabh The description in issue #35377 mentioned 2 things in expected result:
I have not done anything here for the disabled cursor
In the issue, the disabled icon is shown in Phil's video and with safari on mac
It may be a browser-specific thing, but I am not sure
I have not done anything here for the disabled cursor In the issue, the disabled icon is shown in Phil's video and with safari on mac It may be a browser-specific thing, but I am not sure
@rjharishabh Firefox, Chrome and Edge do not do that, so maybe it is a Safari thing or @PhilETaylor wanted to have some css for that purpose. But for me this PR here is sufficient as it is, because the buttons are properly disabled in HTML when I inspect them, and the pointer does not change like it would when there was an enabled button or link, so it is clear that these buttons are disabled.
@PhilETaylor Please report back if you did expect more to be done for solving your issue. Thanks in advance.
I have tested this item
The buttons are properly disabled now when nothing is selected.
If a wrong number of versions is selected, i.e. one version or more than 2 versions for the Compare button or 2 or more versions for the Preview button, the right error message is still show like it was before.
I have tested this item
Bug confirmed and patch is working!
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-11-28 17:30:58 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks!
I have tested this item? unsuccessfully on b632dce
obviously incorrect
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35761.