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

menuitem doesn't pass an UploadEvent for onUpload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 8.6.1, 8.6.0.1
    • 8.6.0
    • None
    • Security Level: Jean
    • None
    • None

      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)"/>
      

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

              Created:
              Updated:
              Resolved:

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