User tests: Successful: Unsuccessful:
The onchange event is not triggered on a form element when the element's value is updated programmatically, only on user input, therefore a "change" event must be dispatched when the user id field value is set.
Without dispatching a change event, the change event listener created for the data-onchange attribute is not triggered, and the associated function is not called.
Edit administrator/components/com_content/forms/article.xml and set an onchange attribute for the create_by field, eg:
<field
name="created_by"
type="user"
label="COM_CONTENT_FIELD_CREATED_BY_LABEL"
onchange="(function(){console.log('change')})()"
/>
Create or edit an article, and in the Options tab, select a new user for the Created By field.
In the browser console, "change" should be displayed when the new user is selected.
Nothing is displayed in the console as a change event is not triggered.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
I have tested this item
Hints for other testers:
No idea why this change got lost.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-06-05 21:45:08 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
NPM Resource Changed
?
|
Obviously got lost at some point in merge conflicts - thankyou!
This has already been proposed, tested and merged - #21323 - but seems to have been dropped at some stage.