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

menuitem doesn't pass an UploadEvent for onUpload

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.6.0
    • Fix Version/s: 8.6.1, 8.6.0.1
    • Component/s: None
    • Security Level: Jean
    • Labels:
      None

      Description

      Steps to Reproduce

      1.

      <menuitem upload="true" label="Upload" onUpload='alert(event.media)'/>
      

      2. click the menuitem
      3. upload a file

      Current Result

      an error: Cannot access field: media, on object: [Event onUpload <Menuitem yW8Qa>]

      Expected Result

      no error. show the uploaded file name

      Debug Information

      • it passes an Event instead of an UploadEvent which breaks our own spec
      • 8.5.2 works correctly and passes an UploadEvent for onUpload

      Workaround

      create the Upload event manually

      		<menuitem label="upload" upload="true"
      				  onUpload="Clients.log(UploadEvent.getLatestUploadEvent(event.getName(), event.getTarget()).media.name)"/>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                CharlesQiu CharlesQiu
                Reporter:
                hawk hawk
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours Time Not Required
                  2h