Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 95a0fa9

Browse files
committed
Docs: Adds a note about popup chaining with a timeout (popup/index.html)
Also addressed to #4796 and #4968
1 parent eebc683 commit 95a0fa9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/pages/popup/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,17 @@ <h2>Theming the popup and overlay</h2>
332332
<h2>Note: Chaining of popups not allowed</h2>
333333
<p>The framework does not currently support chaining of popups so it's not possible to embed a link from one popup to another popup. All links with a <code>data-rel="popup"</code> inside a popup will not do anything at all.</p>
334334
<p>This also means that custom select menus will not work inside popups, because they are themselves implemented using popups. If you place a select menu inside a popup, it will be rendered as a native select menu, even if you specify <code>data-native-menu="false"</code>.</p>
335+
<p>A workaround to get chained popups working is the use of a timeout for example in the <code>popupafterclose</code> event bound to the invoking popup. In the following example, when the first popup is closed, the second will be opened by a delayed call the open method:</p>
336+
<pre><code>
337+
$( document ).on( "pageinit", function() {
338+
$( '.popupParent' ).on({
339+
popupafterclose: function() {
340+
setTimeout( function(){ $( '.popupChild' ).popup( 'open' ) }, 100 );
341+
}
342+
});
343+
});
344+
</code></pre>
345+
335346

336347
</div><!--/content-primary -->
337348

0 commit comments

Comments
 (0)