Closed git-marijus closed 9 years ago
I can't reproduce issues "0".
Issue 1 is due to a javascript error if a group is displayed in the autocomplete, so not related to two autocompletes. Fixed.
I'm not sure what is meant by issue two. Fixed how? Do you mean that the menu should not be displayed at the end of the cursor, but instead always at the same position, at the start of the search box?
"3". Do you mean attach an id to the menu itself?
BTW, when running into problems with javascript libraries, it's usually a good idea to check the javascript error console, as it often contains useful information.
fixed in the sense of css position: fixed; since it belongs to the panel it should not scroll with the page. width should not go offscreen... according to this ( https://github.com/yuku-t/jquery-textcomplete/blob/master/doc/how_to_use.md ) doc it should be possible to attach a class to the dropdown... so should be possible to style each dropdown separately...
Sure. That's already there in the code, currently it uses the acpopup class for all the dropdowns, but this could be changed easily.
If it's supposed to stay with the navbar, why not make it relative to the navbar? That's the correct solution, IMHO, because it continues to work even if the navbar bahviour is changed.
Bug filed upstream: https://github.com/yuku-t/jquery-textcomplete/issues/151
yeah it would be good to have a unique class or id for each ac-dropdown to have the ability to style each seperately...
While possibly useful, is there a specific use case for this right now? Personally I think it would be better to keep all the dropdowns similar, and fix bugs like not being fixed the proper way, in the library itself (setting a fixed position in CSS is just a workaround).
i dont think that styling and positioning with css is a workaround... do you?
In the above case, yes. And I already told you why. It's a bug in the library, and should be fixed in the library.
Now, can you mention some use case for being able to style and position of a specific dropdown, that is not a workaround?
If it's a dropdown that's somehow different from other dropdowns, you shouldn't use a generic dropdown for it, use a more specialized version, and in that dropdown, use another CSS class. That way, if someone uses that dropdown somewhere else too it also gets styled automatically. Cool, huh?
I honestly can't think of a legitimate use of being able to specify an id for the dropdown right now. Especially not for styling purposes. I can see a drawback however: people putting in workarounds, which will just cause bugs to appear later on.
Consider if you now put the dropdown position to fixed using CSS. Now, if someone decides to make the navbar non-fixed, but doesn't know that they also need to change dropdown position (and why would they?) you'd just end up with the reverse of the bug described above. If, on the other hand, the library is modified to handle the case of fixed elements, things "just work", no matter how you style the navbar.
Setting the dropdown position using CSS is probably easier in the short run. But in the long run, the best option is to fix the library upstream so that not every other project also has to come up with a workaround.
feel free to fix it properly when upstream has fixed it...
Fixed, and hopefully included in upstream soon. https://github.com/pafcu/jquery-textcomplete/commit/059b599536592f42abe34426cd92c2ebf4b0a1c8
This issue was moved to redmatrix/redmatrix#299
3 things: