mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-73034 js: add textarea and input check to dragdrop
This commit is contained in:
parent
d135a1200a
commit
b6a0b3a668
2
lib/amd/build/local/reactive/dragdrop.min.js
vendored
2
lib/amd/build/local/reactive/dragdrop.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
lib/amd/src/local/reactive/dragdrop.js
vendored
6
lib/amd/src/local/reactive/dragdrop.js
vendored
@ -212,6 +212,12 @@ export default class extends BaseComponent {
|
||||
* @param {Event} event the event.
|
||||
*/
|
||||
_dragStart(event) {
|
||||
// Cancel dragging if any editable form element is focussed.
|
||||
if (document.activeElement.matches(`textarea, input`)) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
const dropdata = this.parent.getDraggableData();
|
||||
if (!dropdata) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user