Angular resizable popup - javascript

I have a popup that fits to the width of a browser. However, I would like the user to be able to resize and/or reposition the popup modal.
We are using a modal similar to the pattern described in the Angular documentation: http://angular-ui.github.io/bootstrap/#/modal
Is there an example of an angular popup modal that can be dragged/resized?
Could someone post a jfiddle example?

Related

Stop scrolling while viewing a modal

I've made a modal by loosely following this. The problem is that I don't want to be able to scroll the rest of the page while the modal is showing. How can this be done?

Create modal popup in NetSuite

I have a requirement to show modal popup on in netsuite on button click.
currently I open a window using client script
var url = nlapiResolveURL('SUITELET','customscript_id','customdeploy_id',null);
window.open(url);
Now I want to make this window as modal popup to prevent accessing the parent window. Please help.
You'll need to use existing solutions like
Bootsrap or Jquery UI's Modal Window.
If you want to be more elegant and avoid dependencies, you can create your own light implementation. Please, refer to how to make window.open pop up Modal?

Bootstrap modal dialog tabbing in behind page

When I initialize and show bootstrap modal dialog, all elements on the page behind the dialog and expose mask are still reachable by tab navigation.
Here on official Bootstrap page that is not the case. There is no any specific code for this, just simple modal show.
Any ideas how to disable tabbing behind the modal?
Consider migrating to Bootstrap 3, where this is not an issue.

Is there a way to do an accessible modal?

I'm working on a project with Twitter Bootstrap and playing around the JavaScript components using a screen reader.
When I trigger the modal dialog, Jaws skips the modal going to the next link in the page.
Is there a way to implement a accessible modal?
Another solution that I think is to make a static page to the functionality of the modal, and redirect to this page when the user use a screen reader. Can I detected somehow if the user are using a screen reader?
EDIT 2019: N. Hoffmann wrote and maintains an accessible modal component both in vanilla JS (along other components in its van11y project) and jQuery.
Behavior and styles are easily modified via data-* attributes and classes.
It's been tested in way more conditions (screen readers, etc) that what you'd do with your own script ;-)
Also Bootstrap 4 has a fairly accessible modal and Bootstrap 3 in its latest versions (much or all of the Paypal Bootstrap accessibility plugin was backported to 3.3.x).
Modern ressources: Access & Use european initiative details a lot of interesting aspects in a simple manner and points to other resources, including the latest ARIA Deisgn Pattern.
Here's an accessible modal dialog: http://hanshillen.github.com/jqtest/#goto_dialog
Once the modal is activated, keyboard navigation is trapped inside the dialog till it's explicitly closed by the user.
http://irama.org/web/dhtml/lightbox/ details such an accessible implementation (there's little difference between a lightbox and a modal dialog, the important thing is the modal part and keyboard management).
You can also read in Unofficial copy of the DHTML Style Guide the dialog modal part and W3C/WAI-ARIA Making a Dialog Modal.
J. Wajsberg wrote a jQuery plugin able to trap the keyboard input inside a DOM element if you need a more DIY approach.
i don't know any solution to detected automatically if user using a screen reader. but there is the google solution to hide a link at the begining of the page (with left:-1000em and position:absolute) that can be activate if you use keyboard and display a "special mode".
Screen reader users, click here to turn off Google Instant.
for your modal dialog try to use aria and aria-atomic="true" aria-live="assertive" attribute on the dialog html div. it should announce the content of you dialog box.

Modal Dialog Box working with Mozilla but Not working with Chrome

Hi All
I am trying to use modal dialog box in my code. like
window.showModalDialog('pageurl');
Ideally when a modal dialog box is open one should not be able to go to parent window until it is closed.
it is working fine with Mozilla. But in Chrome the one can take control to parent window even if it is open.
Can anyone tell why the problem is occuring? And please help me solving this problem. I t is necessary for me to show same type of modal dialog box in Chrome.
window.showModalDialog(''pageurl);
Can not really be "modal" with Chrome, it's just made like this.
You have to implement your own modal box using JavaScript / JQuery
Example Demo
I suggest you step away from showModalDialog and use a LightBox variant. That gives you more control over what you want and is more XB (cross browser).

Categories