search

Home  >  Q&A  >  body text

javascript - Encountered a strange phenomenon, the button can be dragged into the edit box

As shown in the picture, the "Save" button in the lower right corner of the picture can be clicked and dragged to the edit box

Visually the reason is the browser

In this case, if optimized, the button cannot be dragged over

Should we start with the default behavior of events?

phpcn_u1582phpcn_u15822725 days ago930

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-07-04 13:47:25

    Based on the performance, yours should be a rich text editor based on contenteditable. In this way, no matter what it is, you can drag it in... You can block the elements in the page by disabling draggable, but it is best to start from the rich text editor. The browser itself is better at handling this kind of dragged-in content.

    reply
    0
  • Cancelreply