Giter Club home page Giter Club logo

Comments (7)

Zetouny avatar Zetouny commented on July 23, 2024

just remove the code "elmInputBox.elastic();" from the js. it should work that way !

but don't forget, you will face a problems with the the highlight. so it's better to stay using elastic or to remove the highlighting :D

from jquery-mentions-input.

Raven24 avatar Raven24 commented on July 23, 2024

Sure, but the idea is to make as few modifications to upstream code as possible, in order to make a simple update of a js lib not a possible source for regressions.

from jquery-mentions-input.

fent avatar fent commented on July 23, 2024

+1

I'd like to know the reasoning for putting elastic in this. It seems unneeded. But if I remove that elastic() line from the source it doesn't work anymore.

from jquery-mentions-input.

auchenberg avatar auchenberg commented on July 23, 2024

The reason for why the mentionsInput needs to be "elastic", is because the highlighting of is happening in an underlay underneath the textarea.

If the textarea is having a fixed height, at some point scrollbars will appear, and then the position of the underlay would need to be update. This would require some syncing of positions triggered by the scroll-event, and I imagine it would be a mess, and have bad performance.

So currently if we remove, or disable the elastic-ness, content in the textarea and the underlay would be out of sync when scrolling.

from jquery-mentions-input.

cmer avatar cmer commented on July 23, 2024

+1

from jquery-mentions-input.

Raven24 avatar Raven24 commented on July 23, 2024

How about making it an undocumented, non-default option?
So that those who want to use a different auto-resize plugin can do so, without having to modify this plugin (even if it's just one line that needs to be commented out).
;)

from jquery-mentions-input.

auchenberg avatar auchenberg commented on July 23, 2024

I re-added the option. a60ab5c

from jquery-mentions-input.

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.