Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2440

Client-side doMouseEnter_ and doMouseLeave_ event handlers not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.4
    • 7.0.3
    • ZK Client Engine
    • Security Level: Jimmy

      According to the jsdoc, doMouseEnter_ and doMouseLeave_ should work the same as doMouseOver_ and doMouseOut_.

      However, the code below shows that doMouseEnter_ and doMouseLeave_ are not invoked when they should.

      test.zul
      <zk xmlns:w="client">
          <script><![CDATA[
          zk.afterLoad('zk', function() {
              var _wgt = {};
              
              zk.override(zk.Widget.prototype, _wgt, {
                  doMouseOver_: function(evt) {
                      zk.log('over', evt.domTarget);
                  },
                  doMouseOut_: function(evt) {
                      zk.log('out', evt.domTarget);
                  },
                  doMouseEnter_: function(evt) {
                      zk.log('enter', evt.domTarget);
                  },
                  doMouseLeave_: function(evt) {
                      zk.log('leave', evt.domTarget);
                  }
              });
          });]]></script>
          <style><![CDATA[
          .parent {
              padding: 10px;
              background-color: pink;
          }
          .child {
              width: 100px;
              height: 100px;
              background-color: #ccc;
              margin: auto;
          }
          ]]></style>
          <div sclass="parent">
              Parent
              <div sclass="child">
                  Child
              </div>
          </div>
      </zk>
      

            hanhsu hanhsu
            neillee neillee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: