The width of the input field is too narrow. It makes it difficult to read the text that appears in the autocompleter. Some nodes have titles that start with the same few words, so in some cases it is impossible to distinguish them.
The problem is worse when inside a field group, as the width was calculated to an even lower number.
A patch is attached that sets the width of the input to 100% before the javascript runs to calculate it's width and make room for the buttons on the right.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nodeconnect-input-width-2.patch | 1.49 KB | coffeymachine |
| nodeconnect-input-width-1.patch | 1.13 KB | coffeymachine | |
| listing_image.jpg | 9.06 KB | coffeymachine |
Comments
Comment #1
bnash2501 commentedUpdating this issue:
This problem occurs when the Node Connect fields are hidden in vertical tabs.
The width is calculated by using text.width() on the siblings of the .nodeconnect-add & .nodeconnect-edit items. If the siblings are hidden, jQuery uses the raw css width value (in .field-type-node-reference .form-type-textfield input[type=text] ). This means it thinks 100 is the width instead of the actual rendered value.
For now, we are modifying the CSS width to fix out editor instead of relying on the 100%. This is working as a short term work around and hopefully we can update the patch to provide a better solution.
Hope this helps anyone who has run into the issue.
Comment #2
coffeymachine commentedOK, I see that issue as well.
I made a new patch that removes the dependency on the javascript for the width completely. It is a CSS fix that uses percentage widths. It's not the perfect amount of white-space between the add and edit buttons now, but this should be a much more flexible fix across widths and admin themes.
Comment #3
bnash2501 commented(#2) This works for me.
Comment #4
bryancasler commentedpatch #2 works well enough
Comment #5
cntlscrut commentedPatched reviewed and committed to 7.x-1.x-dev branch