jquery-popup-overlay
Advanced tools
Comparing version 2.0.3 to 2.1.0
@@ -297,2 +297,17 @@ // Cypress end-to-end tests | ||
it("blurignore", () => { | ||
cy.window().then(win => { | ||
win.$("#dynamic").popup({ blurignore: 'h1', blur: true, autoopen: true }); | ||
}); | ||
// Clicking on the popup content should not hide it (this click is also required for a bug in Cypress with pointer-events:none) | ||
cy.get("#dynamic").click(1, 1); | ||
cy.get("#dynamic").should("be.visible"); | ||
// Clicking on h1 to test `blurignore` | ||
cy.get("h1").click({ force: true }); | ||
cy.get("#dynamic").should("be.visible"); | ||
// Clicking outside of the popup | ||
cy.get("#dynamic_wrapper").click(1, 1, { force: true }); // Cypress doesn't respect pointer-events:none; so we have to force the click | ||
cy.get("#dynamic").should("be.hidden"); | ||
}); | ||
it("setzindex true", () => { | ||
@@ -299,0 +314,0 @@ cy.window().then(win => { |
@@ -725,3 +725,8 @@ /*! | ||
// If clicked outside of popup | ||
if ($(el).data('popupoptions') && $(el).data('popupoptions').blur && !$(event.target).closest('#' + elementId).length && event.which !== 2 && $(event.target).is(':visible')) { | ||
if ($(el).data('popupoptions') | ||
&& $(el).data('popupoptions').blur | ||
&& !$(event.target).closest($(el).data('popupoptions').blurignore).length | ||
&& !$(event.target).closest('#' + elementId).length | ||
&& event.which !== 2 | ||
&& $(event.target).is(':visible')) { | ||
@@ -865,2 +870,3 @@ if ($(el).data('popupoptions').background) { | ||
blur: true, | ||
blurignore: null, | ||
setzindex: true, | ||
@@ -867,0 +873,0 @@ autozindex: false, |
{ | ||
"name": "jquery-popup-overlay", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "Lightweight modal popup overlay for jquery", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,5 +8,2 @@ # jQuery Popup Overlay | ||
[![NPM dev dependencies](https://img.shields.io/david/dev/vast-engineering/jquery-popup-overlay.svg?style=flat)](https://david-dm.org/vast-engineering/jquery-popup-overlay?type=dev) | ||
<!-- [![NPM dev dependencies](https://david-dm.org/vast-engineering/jquery-popup-overlay/dev-status.svg)](https://www.npmjs.com/package/jquery-popup-overlay) --> | ||
<!-- [![Downloads](https://img.shields.io/npm/dw/jquery-popup-overlay.svg?style=flat)](https://www.npmjs.com/package/jquery-popup-overlay) --> | ||
<!-- [![GitHub stars](https://img.shields.io/github/stars/vast-engineering/jquery-popup-overlay.svg?label=Stars&style=flat)](https://github.com/vast-engineering/jquery-popup-overlay) --> | ||
@@ -17,10 +14,2 @@ ## Documentation & demo | ||
## License | ||
Released under the [MIT license](https://github.com/vast-engineering/jquery-popup-overlay/blob/gh-pages/LICENSE). | ||
<!-- [![build status][travis-image]][travis-url] --> | ||
<!-- [![Build status][appveyor-image]][appveyor-url] --> | ||
<!-- [travis-image]: https://img.shields.io/travis/jquery-popup-overlay/jquery-popup-overlay/gh-pages.svg?style=flat --> | ||
<!-- [travis-url]: https://travis-ci.org/jquery-popup-overlay/jquery-popup-overlay --> | ||
<!-- [appveyor-image]: https://ci.appveyor.com/api/projects/status/iwxmiobcvbw3b0av/branch/gh-pages?svg=true --> | ||
<!-- [appveyor-url]: https://ci.appveyor.com/project/jquery-popup-overlay/jquery-popup-overlay/branch/gh-pages --> | ||
Released under the [MIT license](https://github.com/vast-engineering/jquery-popup-overlay/blob/gh-pages/LICENSE). © 2013 Vast.com, Inc. |
Sorry, the diff of this file is not supported yet
125307
1444
14