forked from sandywalker/webui-popover
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for dismissible option breaking with multiple popovers open
sandywalker#250 Samuel Brodkey on Sep 6, 2017
- Loading branch information
q2apro
committed
Aug 15, 2019
1 parent
a763cc5
commit a32749e
Showing
2 changed files
with
94 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<html> | ||
<head> | ||
<title>Issue (#248) - Dismissible option not working with multiple popovers</title> | ||
|
||
<link rel="stylesheet" href="../src/jquery.webui-popover.css" /> | ||
<script src="jquery.js" ></script> | ||
<script src="bootstrap.js" ></script> | ||
<script src="../src/jquery.webui-popover.js" ></script> | ||
|
||
<style type="text/css"> | ||
#popover1, #popover3 { | ||
margin-left: 50px; | ||
margin-right: 100px; | ||
} | ||
.pop { | ||
display: inline-block; | ||
border: 1px solid silver; | ||
padding: 2px; | ||
} | ||
.popContainer { | ||
margin-bottom: 60px; | ||
} | ||
.desc { | ||
margin-bottom: 20px; | ||
} | ||
</style> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
$("#popover1").webuiPopover({ | ||
dismissible: false, | ||
placement: "bottom", | ||
content: "I'm not dismissible" | ||
}); | ||
$("#popover2").webuiPopover({ | ||
dismissible: true, | ||
placement: "bottom", | ||
content: "I'm dismissible" | ||
}); | ||
|
||
$("#popover3").webuiPopover({ | ||
multi: true, | ||
dismissible: true, | ||
placement: "bottom", | ||
content: "I'm popover 3" | ||
}); | ||
$("#popover4").webuiPopover({ | ||
multi: true, | ||
dismissible: true, | ||
placement: "bottom", | ||
content: "I'm popover 4" | ||
}); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="desc"> | ||
<b>Problem of issue#248</b>: Opening a dismissible popover causes non-dismissible popovers to become dismissible.<br /><br /> | ||
|
||
<b>Initial conditions</b>: Popover 1 is not dismissible. Popover 2 is dismissible.<br /><br /> | ||
|
||
Step 1) Click popover 1. Observe that it is not dismissible. Close it.<br /> | ||
Step 2) Click popover 2. Observe that it is dismissible. Close it.<br /> | ||
Step 3) Click popover 1. Observe that it is now dismissible!<br /> | ||
</div> | ||
<div class="popContainer"> | ||
<div id="popover1" class="pop">Popover 1</div> | ||
<div id="popover2" class="pop">Popover 2</div> | ||
</div> | ||
|
||
<div class="desc"> | ||
<b>With issue#248 solution in place, ensure that</b>: When an outside click is done for two open popovers, | ||
both should dismiss themselves through their own bodyClickHandler individually.<br /><br /> | ||
|
||
<b>Initial conditions</b>: Both popovers are dismissible and have multi:true.<br /><br /> | ||
|
||
Step 1) Open Popover 3 and Popover 4 so that they're both open at the same time.<br /> | ||
Step 2) Click outside of both of them. Make sure both close.<br /> | ||
</div> | ||
<div> | ||
<div id="popover3" class="pop">Popover 3</div> | ||
<div id="popover4" class="pop">Popover 4</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters