User tests: Successful: Unsuccessful:
This will make it possible to utilize the toolbar buttons in the frontend if the template specifies the tag. With the current implementation, when the base tag is in effect it will navigate away from the page when toolbar buttons are clicked since it interprets href="#" relative to the base and disregards the query string.
For example, if I have a toolbar in index.php?option=com_foobar the href="#" attribute will refer to "index.php#" which will cause the browser to use the link and navigate away from the page using a GET as it is interpreted as a different page instead of submitting the form using Joomla.submitbutton('task'); and using a POST.
Without the tag this is not an issue as the href="#" attribute will refer to "index.php?option=com_foobar#" and the browser will recognize it as the "current" page.
So far i've found two possible solution to this to I just picked the one which I think is more clear.
<a href="#" onclick="$doTask; return false;">
<a href="#" onclick="event.preventDefault(); $doTask;">
Below is the example code used to generate the toolbar
<?php
jimport('joomla.html.toolbar');
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Standard', 'new', 'New', 'new', false);
?>
<form action="index.php?option=com_foobar" id="adminForm" name="adminForm" method="post">
<div id="toolbar-box">
<?php echo $bar->render(); ?>
</div>
<input type="hidden" name="task" value="" />
</form>
I'm closing this as it's not mergeable and 1 year old. Feel free to open if you update it and are still interested in get it merged.
Thanks for contributing.
Please add a tracker on joomlacode and put reference here