User tests: Successful: Unsuccessful:
… maintain backwards compatability
Fixes issue #18203
Pull Request for Issue # .
Added return value to window.listItemTask
create an HTML file in the root of your Joomla installation with this HTML content
<html>
<head>
<title>Test of listItemTask</title>
<script src="media/system/js/core-uncompressed.js" type="text/javascript" ></script>
</head>
<body>
<form id="adminForm" name="adminForm">
<input id="task" name="task" type="text" />
<input id="boxchecked" name="boxchecked" type="checkbox" />
<br>
<input type="button" onclick="test()" value="click to test" />
</form>
<script type="text/javascript">
function test()
{
alert(listItemTask('task', 'xx.task'));
}
</script>
</body>
</html>
when you load the file and click the button you should see an alert with 'false' appear very briefly before the page refreshes .
Without this change you will get an 'undefined in the popup
Category | ⇒ | JavaScript |
Status | New | ⇒ | Pending |
I have tested this item
Tested, have a function listing items which uses listItemTask within a href. Applied fix, links no longer take you to # and instead operate the redirect within the function.
I have tested this item
As this fixes a B/C break in 3.8 can this please go into 3.8.1 @mbabker
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-04 11:32:32 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Here is a better test script that illustrates the problem
the listItemTask method should return false and therefore block the tag link from working
Without the patch the page redirects to index.php instead of following the form submission