Closed buttercookie42 closed 4 years ago
Hey @buttercookie42, you're right I failed to test this plugin properly with classic skin. I did some test and it seems adding a "width" CSS attribute to the input works for classic and doesn't prevent cause any visual change in other skins. Would you mind telling me if this solution looks OK to you? (see patch 6e1660b).
That was quick, thank you. The input field remains a bit narrow in that case, though (in Larry as well I think), so it probably needs an explicit min-width
as well (or just directly set the width
to some explicit value instead of auto
?), maybe some 400 - 500 px – the Classic skin isn't really usable below that kind of widths anyway. Although come to think of it, I didn't try whether the explicit width didn't also break things with the other skins, so hm…
My own initial solution was to keep the input field as full-width and instead move the compose box via $('#compose-div').css('top', '+=18');
(and back again on hiding the custom from input).
Only the Classic skin has a compose-div
, so that one doesn't break the other skins, either.
Ah that's a good idea, I searched for IDs or CSS classes unique to elastic skin but didn't do it for classic. If "#compose-div" exists only here then your solution seems better than mine :)
Out of curiosity, why doing the CSS modification in JS instead of the CSS file? (or maybe this was just for clarity in GitHub comments)
The offset (Classic skin seems to use quite a bit of absolute positioning) needs to be changed back and forth depending on whether the custom from input or the default identities dropdown is being shown, doesn't it? Or am I misunderstanding something?
OK I probably need to try your solution to better understand how it looks :) Would you have a patch I could try somewhere?
See above.
OK I now realize I got initial issue all wrong and didn't understand the whole placement of headers and compose container was made from divs with absolute placements. Thanks so much for taking the time preparing this fix!
Fixed by @buttercookie42 in a7a5524.
In the classic skin, when enabling a "Custom From" the From input turns into a two-line layout, which then pushes the input control for the subject below the main editor input control:
Am I the only one experiencing this for whatever reasons, or is this actually an issue with custom_from? If the latter, I might be able to provide a fix as well - I've simply adjusted custom_from.js to add/subtract an appropriate value from the position of the editor control. Let me know, and I can set up a pull request.