question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng-drag-start doesn't work

See original GitHub issue

Hi @all,

The drag and drop functionality works, but the drag-start event is not fired on drag start.

The html:

<md-item ng-repeat="item in items" ng-drag-start="onDragStart(item)" ng-drag="true" ng-drag-data="item">

The function in my Controller:

        $scope.onDragStart = function(item){
            console.log(item);
        }

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
aaronmallencommented, Sep 9, 2015

👍 ng-drag-start still doesn’t work, I’m not sure why this is closed…

HTML:

<div class="draggable" ng-drag-data="ngModel" ng-drag="true" ng-drag-start="onDragStart($data, $event)">
  <ng-transclude></ng-transclude>
</div>

Script:

$scope.onDragStart = (data,evt) ->
  console.log data
  console.log evt
0reactions
gerome0123commented, Aug 25, 2017

is this issue fix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ondragstart event not firing and not working - Stack Overflow
but the dragstart event doesn't work and when i start dragging on an element it doesn't say you started dragging.Why?
Read more >
Attaching onDragStart to Draggable doesn't seem to work #1656
In the docs it says: DragHandleProps need to be applied to the node that you want to be the drag handle. This is...
Read more >
ondragstart Event - W3Schools
The ondragstart event occurs when the user starts to drag an element or a text selection. Drag and drop is a common feature...
Read more >
HTMLElement: dragstart event - Web APIs | MDN
The dragstart event is fired when the user starts dragging an element or text selection.
Read more >
Draggable#update() doesn't work inside onDragStart callback ...
Hello, I'm trying to align the center of a draggable element to the cursor position at start of dragging. var element = document....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found