Moveable: draggable issue with contentEditable

Created on 11 Jan 2020  路  3Comments  路  Source: daybrush/moveable

Environments

  • Framework name: Angular
  • Framework version: 8.2.14
  • Component name:
  • Component version:
  • Testable Address(optional):

Description

If we create div tag inside div tag and set contentEditable="true" then draggable doesn't work.

It's not working because we have set this:
if (inputEvent.target.nodeName === "DIV") {
stop();
}

drag should stop only for the element which is set as contentEditable="true".

Demo

See attached gif:
draggable_issue

Angular Feature complete

Most helpful comment

@ajinkya-dev

This issue seems to be similar to https://github.com/daybrush/moveable/issues/148.

I'll add this feature soon.

All 3 comments

@ajinkya-dev

This issue seems to be similar to https://github.com/daybrush/moveable/issues/148.

I'll add this feature soon.

@ajinkya-dev @daybrush

To check target element is contentEditable or not,
HTMLElement.isContentEditable is read-only property to check this

The HTMLElement.isContentEditable read-only property returns a Boolean that is true if the contents of the element are editable; otherwise it returns false.

MDN Docs

@ajinkya-dev @jagannath7775
moveable's new version is released.

  • moveable 0.17.1
  • react-moveable 0.20.1
  • preact-moveable 0.19.1
  • ngx-moveable 0.13.1
  • svelte-moveable 0.8.1

add dragArea, padding props.

https://daybrush.com/moveable/release/latest/doc/Moveable.html#dragArea
https://daybrush.com/moveable/release/latest/doc/Moveable.html#padding

Was this page helpful?
0 / 5 - 0 ratings

Related issues

masoudelahi picture masoudelahi  路  5Comments

jiseopX picture jiseopX  路  4Comments

plotpoi picture plotpoi  路  4Comments

scottsquirespix picture scottsquirespix  路  5Comments

prasanthLalapeta picture prasanthLalapeta  路  4Comments