mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 05:07:52 +00:00
Merge pull request #803 from nasa/drag-drop-688
[Firefox] Invoke preventDefault on drop
This commit is contained in:
commit
4441e88769
@ -91,6 +91,7 @@ define(
|
||||
|
||||
if (id) {
|
||||
event.stopPropagation();
|
||||
e.preventDefault();
|
||||
// Delegate the drop to the swimlane itself
|
||||
swimlane.drop(id, droppedObject);
|
||||
}
|
||||
|
@ -162,6 +162,11 @@ define(
|
||||
expect(mockScope.$apply).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("invokes preventDefault on drop", function () {
|
||||
handlers.drop(testEvent);
|
||||
expect(testEvent.preventDefault).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("clears highlights when drag leaves", function () {
|
||||
mockSwimlane.highlight.andReturn(true);
|
||||
handlers.dragleave();
|
||||
|
@ -123,6 +123,7 @@ define(
|
||||
// destination domain object's composition, and persist
|
||||
// the change.
|
||||
if (id) {
|
||||
e.preventDefault();
|
||||
$q.when(action && action.perform()).then(function (result) {
|
||||
//Don't go into edit mode for folders
|
||||
if (domainObjectType!=='folder') {
|
||||
|
@ -194,6 +194,11 @@ define(
|
||||
);
|
||||
});
|
||||
|
||||
it("invokes preventDefault on drop", function () {
|
||||
callbacks.drop(mockEvent);
|
||||
expect(mockEvent.preventDefault).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user