@testing-library/user-event
Version:
Fire events the same way the user does
13 lines (11 loc) • 360 B
JavaScript
import '../../utils/dataTransfer/Clipboard.js';
import { isEditable } from '../../utils/edit/isEditable.js';
import { input } from '../input.js';
import { behavior } from './registry.js';
behavior.cut = (event, target, instance)=>{
return ()=>{
if (isEditable(target)) {
input(instance, target, '', 'deleteByCut');
}
};
};