0

How to handle mouseover event with this textarea resize sign?: enter image description here

The easiest solution is to check if the cursor is in a small area in the right-bottom corner. But maybe there's another solution?

2 Answers2

1

Resize event for textarea?

Since you didn't post what exactly you're trying to do here. Check the link you might get answers

0

you can add the code that you want to execute when the mouseover event occurs. For example, you could change the cursor to a resize cursor to indicate that the element can be resized:

const resizeSign = document.querySelector('.resize-sign');

resizeSign.addEventListener('mouseover', () => {
  document.body.style.cursor = 'resize';
});

resizeSign.addEventListener('mouseout', () => {
  document.body.style.cursor = 'default';
});