diff --git a/controls/slick.gridmenu.js b/controls/slick.gridmenu.js index b362f79e..ae88dfe7 100644 --- a/controls/slick.gridmenu.js +++ b/controls/slick.gridmenu.js @@ -401,7 +401,7 @@ // notify of the onBeforeMenuShow only works when it's a jQuery event (as per slick.core code) // this mean that we cannot notify when the grid menu is attach to a button event if (typeof e.isPropagationStopped === "function") { - if (_self.onBeforeMenuShow.notify(callbackArgs, e, _self) == false) { + if (_self.onBeforeMenuShow.notify(callbackArgs, e, _self).getReturnValue() == false) { return; } } @@ -490,7 +490,7 @@ _isMenuOpen = true; if (typeof e.isPropagationStopped === "function") { - if (_self.onAfterMenuShow.notify(callbackArgs, e, _self) == false) { + if (_self.onAfterMenuShow.notify(callbackArgs, e, _self).getReturnValue() == false) { return; } } @@ -549,7 +549,7 @@ "allColumns": columns, "visibleColumns": getVisibleColumns() }; - if (_self.onMenuClose.notify(callbackArgs, e, _self) == false) { + if (_self.onMenuClose.notify(callbackArgs, e, _self).getReturnValue() == false) { return; } } diff --git a/cypress/integration/example-plugin-custom-tooltip.spec.js b/cypress/integration/example-plugin-custom-tooltip.spec.js index 51e1399e..202bc931 100644 --- a/cypress/integration/example-plugin-custom-tooltip.spec.js +++ b/cypress/integration/example-plugin-custom-tooltip.spec.js @@ -33,7 +33,7 @@ describe('Example - Custom Tooltip', () => { cy.get('@checkbox0-cell').trigger('mouseover'); cy.get('.slick-custom-tooltip').should('not.exist'); - cy.get('@checkbox0-cell').trigger('mouseleave'); + cy.get('@checkbox0-cell').trigger('mouseout'); }); it('should mouse over Task 1 cell and expect async tooltip to show', () => { @@ -52,7 +52,7 @@ describe('Example - Custom Tooltip', () => { cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(0)').contains('Ratio:'); cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(1)').contains(/\d+$/); // use regexp to make sure it's a number - cy.get('@task1-cell').trigger('mouseleave'); + cy.get('@task1-cell').trigger('mouseout'); }); it('should mouse over Task 5 cell and expect async tooltip to show', () => { @@ -71,7 +71,7 @@ describe('Example - Custom Tooltip', () => { cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(0)').contains('Ratio:'); cy.get('.tooltip-2cols-row:nth(2)').find('div:nth(1)').contains(/\d+$/); // use regexp to make sure it's a number - cy.get('@task5-cell').trigger('mouseleave'); + cy.get('@task5-cell').trigger('mouseout'); }); it('should mouse over 6th row Description and expect full cell content to show in a tooltip because cell has ellipsis and is too long for the cell itself', () => { @@ -83,7 +83,7 @@ describe('Example - Custom Tooltip', () => { cy.get('.slick-custom-tooltip').should('not.contain', `regular tooltip (from title attribute)\nTask 5 cell value:\nThis is a sample task description.\nIt can be multiline\n\nAnother line...`); cy.get('.slick-custom-tooltip').should('contain', `This is a sample task description.\nIt can be multiline\n\nAnother line...`); - cy.get('@desc5-cell').trigger('mouseleave'); + cy.get('@desc5-cell').trigger('mouseout'); }); it('should mouse over 6th row Description 2 and expect regular tooltip title + concatenated full cell content when using "useRegularTooltipFromFormatterOnly: true"', () => { @@ -94,7 +94,7 @@ describe('Example - Custom Tooltip', () => { cy.get('.slick-custom-tooltip').should('be.visible'); cy.get('.slick-custom-tooltip').should('contain', `regular tooltip (from title attribute)\nTask 5 cell value:\nThis is a sample task description.\nIt can be multiline\n\nAnother line...`); - cy.get('@desc2-5-cell').trigger('mouseleave'); + cy.get('@desc2-5-cell').trigger('mouseout'); }); it('should mouse over 6th row Duration and expect a custom tooltip shown with 4 label/value pairs displayed', () => { @@ -118,7 +118,7 @@ describe('Example - Custom Tooltip', () => { cy.get('.tooltip-2cols-row:nth(3)').find('div:nth(1)') .find('img').invoke('attr', 'src').then(src => expect(src).to.contain('tick.png')); - cy.get('@duration5-cell').trigger('mouseleave'); + cy.get('@duration5-cell').trigger('mouseout'); }); it('should mouse over % Complete cell of Task 5 and expect regular tooltip to show with content "x %" where x is a number', () => { @@ -129,12 +129,12 @@ describe('Example - Custom Tooltip', () => { cy.get('.slick-custom-tooltip').should('be.visible'); cy.get('.slick-custom-tooltip').contains(/\d+\%$/); - cy.get('@percentage-cell').trigger('mouseleave'); + cy.get('@percentage-cell').trigger('mouseout'); }); it('should mouse over header-row (filter) 1st column checkbox and NOT expect any tooltip to show since it is disabled on that column', () => { cy.get(`.slick-headerrow-columns .slick-headerrow-column:nth(0)`).as('checkbox0-filter') - cy.get('@checkbox0-filter').trigger('mouseover'); + cy.get('@checkbox0-filter').trigger('mouseenter'); cy.get('.slick-custom-tooltip').should('not.exist'); cy.get('@checkbox0-filter').trigger('mouseleave'); @@ -142,7 +142,7 @@ describe('Example - Custom Tooltip', () => { it('should mouse over header-row (filter) 2nd column Title and expect a tooltip to show rendered from an headerRowFormatter', () => { cy.get(`.slick-headerrow-columns .slick-headerrow-column:nth(1)`).as('checkbox0-filter') - cy.get('@checkbox0-filter').trigger('mouseover'); + cy.get('@checkbox0-filter').trigger('mouseenter'); cy.get('.slick-custom-tooltip').should('be.visible'); cy.get('.slick-custom-tooltip').contains('Custom Tooltip - Header Row (filter)'); @@ -155,7 +155,7 @@ describe('Example - Custom Tooltip', () => { it('should mouse over header-row (filter) Finish column and NOT expect any tooltip to show since it is disabled on that column', () => { cy.get(`.slick-headerrow-columns .slick-headerrow-column:nth(7)`).as('finish-filter') - cy.get('@finish-filter').trigger('mouseover'); + cy.get('@finish-filter').trigger('mouseenter'); cy.get('.slick-custom-tooltip').should('not.exist'); cy.get('@finish-filter').trigger('mouseleave'); @@ -163,7 +163,7 @@ describe('Example - Custom Tooltip', () => { it('should mouse over header title on 1st column with checkbox and NOT expect any tooltip to show since it is disabled on that column', () => { cy.get(`.slick-header-columns .slick-header-column:nth(0)`).as('checkbox-header') - cy.get('@checkbox-header').trigger('mouseover'); + cy.get('@checkbox-header').trigger('mouseenter'); cy.get('.slick-custom-tooltip').should('not.exist'); cy.get('@checkbox-header').trigger('mouseleave'); @@ -171,7 +171,7 @@ describe('Example - Custom Tooltip', () => { it('should mouse over header title on 2nd column with Title name and expect a tooltip to show rendered from an headerFormatter', () => { cy.get(`.slick-header-columns .slick-header-column:nth(1)`).as('checkbox0-header') - cy.get('@checkbox0-header').trigger('mouseover'); + cy.get('@checkbox0-header').trigger('mouseenter'); cy.get('.slick-custom-tooltip').should('be.visible'); cy.get('.slick-custom-tooltip').contains('Custom Tooltip - Header'); @@ -184,7 +184,7 @@ describe('Example - Custom Tooltip', () => { it('should mouse over header title on 2nd column with Finish name and NOT expect any tooltip to show since it is disabled on that column', () => { cy.get(`.slick-header-columns .slick-header-column:nth(7)`).as('finish-header') - cy.get('@finish-header').trigger('mouseover'); + cy.get('@finish-header').trigger('mouseenter'); cy.get('.slick-custom-tooltip').should('not.exist'); cy.get('@finish-header').trigger('mouseleave'); diff --git a/examples/example-checkbox-header-row.html b/examples/example-checkbox-header-row.html index 521a6f3c..94a49cba 100644 --- a/examples/example-checkbox-header-row.html +++ b/examples/example-checkbox-header-row.html @@ -118,12 +118,12 @@