Code Monkey home page Code Monkey logo

Comments (9)

FezVrasta avatar FezVrasta commented on May 12, 2024 2

It's the preventOverflow modifier that kicks in when it shouldn't...

A temporary fix is to disable this modifier:
http://codepen.io/FezVrasta/pen/Lkjjqb

But the modifier should be fixed.

from floating-ui.

Falingorn avatar Falingorn commented on May 12, 2024

Thanks a lot 👍 ... I'll probably use it as you suggest and try to fix it later on if I'll get a timeframe for this.
Happy coding! :)

from floating-ui.

FezVrasta avatar FezVrasta commented on May 12, 2024

@Falingorn had you a chance to look at this problem?

from floating-ui.

FezVrasta avatar FezVrasta commented on May 12, 2024

I'm digging into it, seems like the problem is the arrow modifier, not preventOverflow

This makes the bug much easier to fix :)

from floating-ui.

FezVrasta avatar FezVrasta commented on May 12, 2024

Ok found the problem, in your example, the arrow element has not style, this makes the arrow wide as the popper, and creates the problem you describe.

You should not add an arrow if you don't want to use it, or give a width to the arrow to make it work properly.

http://codepen.io/FezVrasta/pen/ZOmBkQ

I'm closing it for now because it doesn't seem like a bug of the library but a misconfiguration. If you have any idea to avoid this problem let me know.
For now I'd say: Don't use arrow if you don't want to display one.

from floating-ui.

Falingorn avatar Falingorn commented on May 12, 2024

Thanks a lot ... will try it.
Is there a possibility to decide via configuration options if popper has an arrow or not? I think this would be a better approach than solve this with css.

You rock man! ;)

from floating-ui.

FezVrasta avatar FezVrasta commented on May 12, 2024

you can set arrowTagName to undefined(or any falsy value) to avoid the creation of the arrow element.

http://codepen.io/FezVrasta/pen/RRqBdO

from floating-ui.

ArtemKolychev avatar ArtemKolychev commented on May 12, 2024

I have to same problem in version "@popperjs/core": "^2.11.0"
node 10.
framework Vue 2

createPopper(document.querySelector(...), document.querySelector(...), {
        placement: 'bottom',
        modifiers: [...], // offset[0,5]
      });

from floating-ui.

ArtemKolychev avatar ArtemKolychev commented on May 12, 2024

Ok. I fix it. You need wrap your's trigger div with position: absolute

<div style="position: absolute">
    <i
      class="icon-custom icon-custom--info"
    />
    <div
      :style="..."
      role="tooltip"
    >
      <slot name="content"/>
      <div
        id="arrow"
        data-popper-arrow/>
    </div>

  </div>

from floating-ui.

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.