Skip to content

Commit

Permalink
fallback to centered when triggered element is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
HTMLGuyLLC committed Mar 26, 2019
1 parent badfcd7 commit bef30b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions jConfirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@
let tooltip_width = helper.tooltip.outerWidth();
let tooltip_height = helper.tooltip.outerHeight();

//if the original element is gone
if( helper.dom_wrapped.length === 0 )
//if the original element is gone or hidden
if( helper.dom_wrapped.length === 0 || !helper.dom_wrapped.is(":visible") )
{
helper.position = 'auto';
return ['none', 0, tooltip_width, tooltip_height, 'undefined'];
Expand Down
2 changes: 1 addition & 1 deletion jConfirm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jconfirm",
"version": "4.4.2",
"version": "4.4.3",
"description": "jQuery confirmation tooltip plugin",
"repository": {
"type": "git",
Expand Down

0 comments on commit bef30b9

Please sign in to comment.