Hi, I want to make my dialog2 be resizable like html tag textarea,
so I added the Style as the following on dialog2:
<button id="dialog-show-button" class="aui-button">show</button>
<section id="demo-dialog" class="aui-dialog2 aui-dialog2-small aui-layer" role="dialog" aria-hidden="true" style="resize: both;overflow: auto;">
<header class="aui-dialog2-header">
<h2 class="aui-dialog2-header-main">test</h2>
<a class="aui-dialog2-header-close">
<span class="aui-icon aui-icon-small aui-iconfont-close-dialog">Close</span>
</a>
</header>
<div class="aui-dialog2-content">
<p>nothing</p>
</div>
<footer class="aui-dialog2-footer">
<div class="aui-dialog2-footer-actions">
<button id="dialog-submit-button" class="aui-button aui-button-primary">ok</button>
</div>
</footer>
</section>
but I got this:
here is my code on JS Bin.
need your help and suggestions,
thank you.
Hi @Chien-Hao Chen,
The CSS "resize" property only applies to form input elements, so it won't help you change the size of the dialog element dynamically.
You've currently got the `aui-dialog2-small` CSS class on the dialog. If you want it to be larger, you could change that to `aui-dialog2-xlarge`; check the "HTML Attributes" section of Dialog2's documentation for the valid CSS class values you can add to change the dialog's size.
The preset sizes for dialog2 will automatically resize with the browser as it shrinks in size; this allows them to work on mobile devices like iPads.
If what you really want to do is make the dialog take up most of the browser's width and height, you could first remove the `aui-dialog2-xyz` size class, then create your own that does something similar, using either CSS calc or fixed positioning to determine the appropriate size to render at. I don't recommend this, as it will be susceptible to breaking if and when either Jira or AUI make design changes.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.