Created
May 21, 2014 03:42
-
-
Save js1972/d1bf1bdd57d656ac0706 to your computer and use it in GitHub Desktop.
Cancel a UI5 dialog when clicked outside.
With Twitter Bootstrap dialogs you can click anywhere on the page outside of the dialog to close it (as if you had clicked the close button).
This basis jQuery code enables the same with a UI5 app. The example below is with the sap.m.ResponsivePopover control but it works with any dialog that uses a bloc…
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
$(function() { | |
$('body').on('click', '#sap-ui-blocklayer-popup', function() { | |
var popover = sap.ui.getCore().byId('responsivePopover'); | |
popover.close(); | |
popover.destroy(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment