Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1574 closed defect (wontfix)

ToolbarButtons in a ToolbarButtonGroup do not respond to events.

Reported by: cleonello Owned by: liucougar
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

Toolbar buttons in a button group do not respond to event like regular toolbar buttons. I am using rev 5897 from svn. This is shown by modifying the test_Toolbar_events.html to include a button group as shown below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>dojo Trac #448 Test case</title>
    <script type="text/javascript" src="../../dojo.js"></script>

    <script type="text/javascript">
	dojo.require("dojo.widget.Manager");
      dojo.require("dojo.widget.*");
      dojo.require("dojo.widget.Toolbar");
    </script>

<script>
	
      function dumpOutput(val) {
      var obj=document.getElementById("output");
      obj.innerHTML=obj.innerHTML+" "+val;
      }

      function toolbarclick(){
      dumpOutput("onClick")
      }
      
      function toolbarmouseover(){
      dumpOutput("onMouseOver")
      }

      function toolbarmouseout(){
      dumpOutput("onMouseOut")
      }

      
</script>


  </head>

  <body>
    <h1>dojo Trac #448 Test case</h1>

Test case for dojo Trac #448 - ToolbarItem needs to have handlers defined to work in markup.
<br>Supported events: onclick, onmouseover, onmouseout
<br>Each event outputs event name string to output outline
<br>

<div dojoType="toolbar">
<img dojoType="ToolbarButton" name="toolitem" label="Cut" onMouseOver="toolbarmouseover()" onClick="toolbarclick()" onMouseOut="toolbarmouseout()" icon="../../src/widget/templates/buttons/cut.gif">
</img>
</div>

<span dojo:type="ToolbarButtonGroup" id="detailgroup" preventDeselect="true">
    <img dojo:type="ToolbarButton" dojo:icon="../../src/widget/templates/buttons/copy.gif" onMouseOut="toolbarmouseout()" onMouseOver="toolbarmouseover()" onClick="toolbarclick();" toggleItem="true" dojo:label="Copy" name="copybtn" />
    <img dojo:type="ToolbarButton" dojo:icon="../../src/widget/templates/buttons/paste.gif" onMouseOut="toolbarmouseout()"  onMouseOver="toolbarmouseover()" onClick="toolbarclick();" toggleItem="true" dojo:label="Paste" name="pastebtn"  />
</span>

<div id="output" onclick="this.innerHTML = ''" style="font-size:0.8em;overflow:auto;z-index:300;border:2px solid black;background:#ffffff;float:right;width:500px;height:200px;"></div>



    <hr>
    <address><a href="mailto:neildev@gmail.com">Neil J</a></address>
<!-- Created: Tue Jul 11 03:27:49 EDT 2006 -->
<!-- hhmts start -->
Last modified: Tue Jul 11 05:32:43 EDT 2006
<!-- hhmts end -->
  </body>
</html>

This problem was also pointed out recently (2006-09-06) on the dojo.user mailing list with the subject "Problem with event handlers on ToolbarButtons?".

Thanks,

Chris

cleonello @at@ yahoo.com

Change History (3)

comment:1 Changed 13 years ago by dylan

Milestone: 0.4
Owner: changed from bill to liucougar

comment:2 Changed 13 years ago by liucougar

Resolution: wontfix
Status: newclosed

these widgets along with Editor is deprecated, so please use Editor2/Editor2Toolbar instead

comment:3 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.