desandro / draggabilly

:point_down: Make that shiz draggable
https://draggabilly.desandro.com
MIT License
3.86k stars 386 forks source link

TinyMCE and Drag Conflict Issues #212

Closed andrew2558 closed 4 years ago

andrew2558 commented 4 years ago

My page reads as follows.

The problem is that when I use draggabilly to drag the move-line, dragging to the left is fine, but when I drag it to the right, it doesn't work in the area where the tinymce compiler is located. How do I fix this problem?

enter image description here wo7Y8

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <title>TinyMCE Drag</title>
 <script src="../lib/jquery3.5.1/jquery-3.5.1.js"></script>
 <script src="../lib/tinymce_5.4.0/js/tinymce.min.js"></script>
 <script src="../lib/draggabilly/draggabilly.pkgd.min.js"></script>

 <style>
 html,
 body {
 margin: 0;
 padding: 0;
 height: 100%;
 width: 100%;
 }
 .all-warp {
 display: flex;
 flex-direction: row;
 width: 100%;
 height: 100%;
 }
 .left {
 width: 200px;
 background-color: burlywood;
 }
 .move-line {
 width: 4px;
 background-color: crimson;
 cursor:e-resize;
 }
 .editor-warp {
 flex-grow: 2;
 }
 </style>
</head>
<body>
 <div class="all-warp">
 <div class="left"></div>
 <div class="move-line"></div>
 <div class="editor-warp">
 <textarea id="editor"></textarea>
 </div>
 </div>

 <script>
 $(document).ready(function () {
 var $draggable = $('.move-line').draggabilly({
 axis: 'x',
 containment: '.all-warp'
 })
 });
 tinymce.init({
 selector: '#editor',
 menubar: false,
 statusbar: false,
 language: 'zh_CN',
 resize: false,
 height:500,
 });
 </script>
</body>
</html>