Password field doesn't show text if show icon is clicked on

Phoca Cart - complex e-commerce extension
User avatar
sulpher
Phoca Professional
Phoca Professional
Posts: 104
Joined: 28 Feb 2017, 09:45

Password field doesn't show text if show icon is clicked on

Post by sulpher »

Hi,
Dmitrijs found an issue: in payment method we added a field with type "password".
There is an eye icon, but if we click on it, no text appears. Password is still hidden.

Image

Looks like a Phoca Cart issue.


Phoca Cart 4.0.10
Joomla 4.4.3
User avatar
sulpher
Phoca Professional
Phoca Professional
Posts: 104
Joined: 28 Feb 2017, 09:45

Re: Password field doesn't show text if show icon is clicked on

Post by sulpher »

Also showon doesn't working too.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Password field doesn't show text if show icon is clicked on

Post by Jan »

Hi, thank your for the info, maybe this can be related to some functions which needed to be written when Joomla core removed tooltips. Where exactly does not work the showon? In tab for payment plugin parameter, this can be maybe caused by dynamically loaded form, not sure if the Joomla core feature for showon can work with dinamically form items. If not, maybe it will be not possible to somehow correct this core function and the showon parameter in plugin parameters will have to be omitted :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Password field doesn't show text if show icon is clicked on

Post by Jan »

Confirmed, both showon and display/hide password Javascripts (e.g. media/system/js/fields/passwordview.js) are not able to work with dynamically loaded forms :idea:

In the AJAX which loads the parameters, there is new calling of showon script, maybe it changed in newest Joomla again (as it worked previously for showon)
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Password field doesn't show text if show icon is clicked on

Post by Jan »

BTW, testing now, the showon works OK there. :idea:

The problem with password is, the core password function in Joomla is wrongly written as it does not count with dynamically added form fields. This is different to showon which has initialize function and can be reinitialized after loading new dynamic items (which is even not right as it does not count with dynamically items from start but as developer you can somehow correct it).

And it even seems that this does not work in subforms so we need to write some bug report for Joomla core.
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Password field doesn't show text if show icon is clicked on

Post by Jan »

If you find Phoca extensions useful, please support the project
User avatar
sulpher
Phoca Professional
Phoca Professional
Posts: 104
Joined: 28 Feb 2017, 09:45

Re: Password field doesn't show text if show icon is clicked on

Post by sulpher »

Ok, it is nice you've reproduced the issue and already reported the bug to Joomla's Github project.
I hope this task will be resolved later.
Post Reply