event.which and event.button give wrong values in case of right click drag

Fixed Issue #7421580


girish s.
May 3, 2016
This issue is public.
Found in
  • Internet Explorer
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Steps to reproduce:

  1. Paste the following html into a file test.html, place a local image named localimage.jpg in the same directory. Open it with IE 11.
    function drag(ev) {
    ev.dataTransfer.setData(“text", ev.target.id);
    alert(“ev.button: “+ev.button+", ev.which: “+ev.which);
    <img id="drag1” src="localimage.jpg” draggable="true” ondragstart="drag(event)" width="336” height="69">
  2. drag the image with right mouse button
    Expected result:
    event.button should give 2, event.which should give 3
    Actual result:
    event.button gives 0, event.which gives 1.
    The event passed is a dragEvent, and according to API reference, https://msdn.microsoft.com/en-us/library/ff974339(v=vs.85).aspx , these properties should be available
    Extra information:
    Dragging with right click is not supported in Chrome or Firefox, but I have not found any documentation mentioning this difference in behaviour in IE.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Status to “Fixed”

    • Hello,

      Thank you for the feedback on Internet Explorer. We are not working on IE feature bugs any longer unless they are security related. This website is being used for product feedback on MS Edge and we welcome any feedback you have on it.

      For this repro, I see that Edge does have the same behavior in our TH2 / 10586 build. However, on more recent builds such as our Insider Fast versions, I see that our behavior matches Chrome and Firefox. As a result, this item will be closed out as Fixed since we are applying our testing of this repro to Edge.

      All the best,
      The MS Edge Team

    You need to sign in to your Microsoft account to add a comment.

    Sign in