How to prevent default click event when both Draggable and Toolips

1 Answer 949 Views
Drag and Drop ToolTip
Huihui
Top achievements
Rank 1
Huihui asked on 13 Oct 2021, 04:10 AM

I have an element need to inited both Draggable and Toolips, and I want to prevent tooltips show event when dragend, I use e.preventdefault() , but it don't work.

The version I'm using is 2017.3.913

For some reason, I can't update to the latest.

My  html

<div class="edit-tooltips" style="left: ${xPx};top: ${yPx}">
        <div class="sensor-point new-point" > content
          ${ index }
        </div>
</div>

My js

$(".edit-tooltips").kendoTooltip({
   autoHide:false,
   showOn: "click"
  .....
})


$(".sensor-point").kendoDraggable({
        hint: (element)=>{
             return ....
        },
        dragstart: (e:any)=>{

        },
        dragend: (e:any)=> {
           ....
          e.preventDefault()  // this dot'n work, tooltips show event will still be triggered
        }
      })

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 15 Oct 2021, 11:24 AM

Hello Huihui,

I am afraid I do not understand clearly in which scenario Tooltip show needs to be prevented. That is why I have created the following Dojo sample based on the snippets sent:

https://dojo.telerik.com/IlimuMiw/3

Could you, please, modify it so that it replicates the scenario in question and send it back to me? Also, could you, please, explain what is the issue faced by using the above sample as a starting point? This way I will be able to troubleshoot the case locally and to provide you with the most appropriate assistance on that.

Looking forward to hearing from you.

Regards,
Veselin Tsvetanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Huihui
Top achievements
Rank 1
commented on 20 Oct 2021, 01:53 AM

Thanks for relay, I've resovled this question by just setting the autoHide options to true.
Tags
Drag and Drop ToolTip
Asked by
Huihui
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or