Giter Site home page Giter Site logo

Comments (2)

Frankitch avatar Frankitch commented on August 14, 2024

@jchristensen726 I am facing the same issue but I have noticed that if the form field appearance is set to outline instead of fill (the default one), it works. I did not find what in the fill appearance causes this issue so far... Anyone for a workaround?

from angular-mentions.

sumbricht avatar sumbricht commented on August 14, 2024

@jchristensen726 I stumbled across the same issue today and did some investigation. An article on stacking contexts pointed me to a Chrome / Firefox extension named "CSS Stacking Context Inspector". With that and a bit of playing around I figured out what was happening (in my situation) and how to fix it. As I'm not sure whether it will be a cookie cutter solution, here rather a little recipe for how you could manage to solve this for your case:

  • Open node_modules/angular-mentions/fesm2020/angular-mentions.mjs and comment out the call to this.stopSearch(); in blurHandler(event). This ensures that the overlay with the mention suggestions does not close but will stay open indefinitely (that's helpful as you'd have a hard time debugging if the DOM element keeps disappearing when it loses focus)
  • Use the Stacking Context Inspector to see what elements have a stacking context that's overlapping your content. For me it looked like this. Two table rows (headers and column filters) were overlapping search results b-e (see image)
    image
  • As you can see, each thhas its own stacking context and the next "higher" parent context was the main context (mat-sidenav-content) area
  • Now the essential part: I had to force the mat-form-field (which contained the mention field) to have its own stacking context. You can do that using CSS by giving it position: relative; and a z-index higher than 0. In my case I saw that the <table> containing the ths had z-index: 100; so I had to go to 101 or higher
  • As you can see, the mat-form-field now has its own stacking context; this wasn't the case before
    image
  • Don't forget to uncomment this.stopSearch(); :-)

I hope this helps you get down to the problem

from angular-mentions.

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.