MDL-73034 js: add textarea and input check to dragdrop

This commit is contained in:
Ferran Recio 2021-11-09 11:48:12 +01:00
parent d135a1200a
commit b6a0b3a668
3 changed files with 8 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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;