mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Reset the position of the Hallo bar after the input fields expand
This commit is contained in:
parent
015e9da9b8
commit
bad069ffb8
@ -34,6 +34,9 @@ function makeRichTextEditable(id) {
|
||||
|
||||
var closestObj = input.closest('.object');
|
||||
|
||||
/* Events for when CSS transitions end, for various browsers */
|
||||
var transitionEvents = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend';
|
||||
|
||||
richText.hallo({
|
||||
toolbar: 'halloToolbarFixed',
|
||||
toolbarCssClass: (closestObj.hasClass('full')) ? 'full' : (closestObj.hasClass('stream-field')) ? 'stream-field' : '',
|
||||
@ -46,6 +49,17 @@ function makeRichTextEditable(id) {
|
||||
}
|
||||
}).bind('paste', function(event, data) {
|
||||
setTimeout(removeStyling, 1);
|
||||
/* Reset the position of Hallo toolbar after the input boxes finish resizing */
|
||||
}).bind('halloactivated', function(event, data) {
|
||||
$(event.target).one(transitionEvents, function(e) {
|
||||
data.turnOn();
|
||||
});
|
||||
$(event.target).addClass('expanded');
|
||||
}).bind('hallodeactivated', function(event, data) {
|
||||
$(event.target).one(transitionEvents, function(e) {
|
||||
data.turnOff();
|
||||
});
|
||||
$(event.target).removeClass('expanded');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@
|
||||
padding-bottom:1em;
|
||||
@include transition(padding .2s ease);
|
||||
|
||||
&.inEditMode{
|
||||
&.expanded{
|
||||
padding-top:5em; /* to provide space for editor buttons */
|
||||
padding-bottom:2em;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user