Giter Club home page Giter Club logo

Comments (4)

keithamus avatar keithamus commented on June 16, 2024

@josepharhar will be able to answer this succinctly.

from html.

josepharhar avatar josepharhar commented on June 16, 2024

I think it would introduce complexity and unexpected states to allow switching between popover types without closing the popover. For example, we currently only allow multiple popover=auto popovers to be open if they are associated via a relationship, such as if one is a dom ancestor of another. If we allowed an unrelated popover to switch from popover=manual to popover=auto, should we close all other popover=auto popovers? If we don't then other algorithms would encounter an invalid state, and if we do then we have to add a bunch of partially duplicated code from the hide popover algorithm.

I have a case: there's a global tooltip (implements with popover also) in popover (call it "X" alias).
When the X popover shown, then shows the global tooltip, the X popover auto closed.

Why does your popover need to change states after opening? Why can't it just have popover=manual before it opens?

from html.

woody-li avatar woody-li commented on June 16, 2024

@josepharhar Thanks for your reply.
In my case, the popover and tooltip both needs light dismiss, so it setted as auto.
But when the tooltip shows, don't want to hide it.

So changed it's attribute from auto to manual when tooltip shows, and change back after closed.

Maybe the only case is tooltip, a global one without ancestor relationship to other elements.

from html.

josepharhar avatar josepharhar commented on June 16, 2024

Ah I see your use case, it would be perfectly handled by the proposed popover=hint value:
#9776
#9778
I'm going to close this issue in favor of #9776
Please comment there if that proposal doesn't fit your use case in any way, but I believe it will.

from html.

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.