locked
ondragstart event is not working in CRM 2013 custom HTML page. RRS feed

  • Question

  • Hi All,

    I am developing a custom HTML page in CRM 2013 and loaded ClientGlobalContext.js.aspx to utilize the CRM context on this page, 
    but this ClientGlobalContext.js.aspx it cancelling the "ondragstart" event. 
    https://msdn.microsoft.com/en-us/library/gg328541.aspx

    "The ClientGlobalContext.js.aspx page will include some global event handlers. These event handlers will cancel the onselectstart, contextmenu, and ondragstart events. "

    Can you any one please let me know that how i can achieve drag and drop in CRM custom HTML page, 
    is there any way yo disable this ondragstart event cancelling ?


    Thanks in advance, Veeresh

    Tuesday, February 10, 2015 12:14 PM

All replies

  • Hello,

    Try to add following js code to your form onload event:

    if (document && document._events && document._events.unload && document._events.unload[0] && document._events.unload[0].handler){
    document._events.unload[0].handler();
    }



    Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
    My blog

    Tuesday, February 10, 2015 2:03 PM
    Moderator
  • Hi Andrii,

    It is working, great! Thank you very much.



    Thanks in advance, Veeresh

    Friday, February 13, 2015 9:31 AM
  • Hi Andrii,

    It is working, great! Thank you very much.



    Thanks in advance, Veeresh


    So you can now mark my reply as an answer.

    Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
    My blog

    Friday, February 13, 2015 9:38 AM
    Moderator