diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index 465d6a1d3b..ec8ed503c5 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -250,7 +250,7 @@ define( // Position a panel after a drop event function handleDrop(e, id, position) { // Don't handle this event if it has already been handled - if (e.isDefaultPrevented()) { + if (e.defaultPrevented) { return; } e.preventDefault(); diff --git a/platform/features/layout/src/LayoutController.js b/platform/features/layout/src/LayoutController.js index a3219667f9..1c58f92988 100644 --- a/platform/features/layout/src/LayoutController.js +++ b/platform/features/layout/src/LayoutController.js @@ -109,7 +109,7 @@ define( // Position a panel after a drop event function handleDrop(e, id, position) { - if (e.isDefaultPrevented()) { + if (e.defaultPrevented) { return; } // Ensure that configuration field is populated diff --git a/platform/features/layout/test/FixedControllerSpec.js b/platform/features/layout/test/FixedControllerSpec.js index b4e05c9665..8f98391986 100644 --- a/platform/features/layout/test/FixedControllerSpec.js +++ b/platform/features/layout/test/FixedControllerSpec.js @@ -101,7 +101,7 @@ define( ); mockEvent = jasmine.createSpyObj( 'event', - [ 'preventDefault', 'isDefaultPrevented' ] + [ 'preventDefault' ] ); testGrid = [ 123, 456 ]; @@ -326,7 +326,7 @@ define( it("ignores drops when default has been prevented", function () { // Avoids redundant drop-handling, WTD-1233 - mockEvent.isDefaultPrevented.andReturn(true); + mockEvent.defaultPrevented = true; // Notify that a drop occurred testModel.composition.push('d'); diff --git a/platform/features/layout/test/LayoutControllerSpec.js b/platform/features/layout/test/LayoutControllerSpec.js index d6cc3d035b..5ec80755f4 100644 --- a/platform/features/layout/test/LayoutControllerSpec.js +++ b/platform/features/layout/test/LayoutControllerSpec.js @@ -40,7 +40,7 @@ define( ); mockEvent = jasmine.createSpyObj( 'event', - [ 'preventDefault', 'isDefaultPrevented' ] + [ 'preventDefault' ] ); testModel = { @@ -164,7 +164,7 @@ define( it("ignores drops when default has been prevented", function () { // Avoids redundant drop-handling, WTD-1233 - mockEvent.isDefaultPrevented.andReturn(true); + mockEvent.defaultPrevented = true; // Notify that a drop occurred testModel.composition.push('d');