Giter Club home page Giter Club logo

Comments (4)

wallythewebdev avatar wallythewebdev commented on June 9, 2024 1

@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.

limonte avatar limonte commented on June 9, 2024

This request sounds like too custom use-case, I don't think it should be in the lib.

from sweetalert2.

limonte avatar limonte commented on June 9, 2024

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.

wallythewebdev avatar wallythewebdev commented on June 9, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.