Comments (4)
@limonte thanks for taking the time to look at this request.
Respectfully I disagree with this being a custom use case as the functionality to allow scrolling while a modal is on screen is already a feature of this lib which can be seen in this code pen: https://codepen.io/wally_theWebDev/pen/ExMdKJm
Having the ability to allow for scrolling while keeping the backdrop seemed to me like a useful option to have - as would having the ability to not have a backdrop and not allow scrolling.
Maybe an option for "allow_page_scrolling" (defaults to false) is what I am suggesting.
Maybe the above example makes the request a little clearer or maybe you still feel that this is a custom use case, either way I can code around it but it just stuck in my head as a somewhat obvious feature that was missing from the current array of options (which is a great btw, this lib is super useful and really well put together so i'm not knocking it at all).
Thanks again - have a great weekend.
from sweetalert2.
This request sounds like too custom use-case, I don't think it should be in the lib.
from sweetalert2.
Having the ability to allow for scrolling while keeping the backdrop seemed to me like a useful option to have - as would having the ability to not have a backdrop and not allow scrolling.
That'd go against the definition of modal window:
A modal window creates a mode that disables user interaction with the main window but keeps it visible, with the modal window as a child window in front of it. Users must interact with the modal window before they can return to the parent window. This avoids interrupting the workflow on the main window. Modal windows are sometimes called heavy windows or modal dialogs because they often display a dialog box.
Setting backdrop: false
eventually makes SWAL work in modeless mode.
from sweetalert2.
@limonte thanks again for the reply and the links.
So the debatable aspect of this request (and why I think there is a use case for the feature) is - what is to be considered the main window? In my instance (self deprecating I know) I am applying the modal to a section of content to be blocked, so that becomes the main window where user interaction should be blocked. I think it also comes down to how flexible the Library wants to be in terms of functionality (again - this is an amazing library, not implying anything negative against it).
So I still do think there is a use case for this feature, however, if its just not inline with the libraries objectives then fair enough.
Again thanks for taking the time to consider and reply its very appreciated.
from sweetalert2.
Related Issues (20)
- In earlier versions of Chrome (e.g. Chrome87) pop-ups are not normal. HOT 1
- sweet alert break background layout. HOT 2
- Circle animation for success icon breaks when timing exceeds 4 seconds HOT 1
- Icons invisible with colored-toast HOT 2
- Timer doesn't seem to be working HOT 1
- Can u also update the integrations with js frameworks? HOT 1
- isVisible not false in .then() HOT 2
- How can we add Angular component in sweetalert.
- .NET 8 Blazor - Error: There are multiple .NET runtimes present HOT 3
- support russia HOT 2
- Input Types - Email HOT 3
- Wave Tool accessibility errors SweetAlert2 HOT 1
- Partial<SweetAlertOptions> not working when using spreading operator HOT 1
- showLoaderOnConfirm not showing loader HOT 1
- ERROR ReferenceError: document is not defined at validateCustomTargetElement Angular SSR HOT 1
- Respond immediately to tap on option in inputOptions HOT 2
- `autoSelect` option HOT 4
- Chaining modals and running modals in sequence has incorrect behaviour HOT 3
- sweetAlert2 icons showing wrong HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sweetalert2.