kopia lustrzana https://github.com/wagtail/wagtail
Ensure admin tab events are handled on page load
The `shown.bs.tab` event was being bound after showTab() was already called, so on page load, the tabs weren't being updated correctly.pull/7510/head
rodzic
eba4ac1563
commit
7d9e90fdbd
|
@ -36,6 +36,7 @@ Changelog
|
|||
* Fix: Add handling of invalid inline styles submitted to `RichText` so `ConfigException` is not thrown (Alex Tomkins)
|
||||
* Fix: Ensure comment notifications dropdown handles longer translations without overflowing content (Krzysztof Jeziorny)
|
||||
* Fix: Set `default_auto_field` in `postgres_search` `AppConfig` (Nick Moreton)
|
||||
* Fix: Ensure admin tab JS events are handled on page load (Andrew Stone)
|
||||
|
||||
|
||||
2.14.1 (12.08.2021)
|
||||
|
|
|
@ -295,6 +295,16 @@ $(() => {
|
|||
$(this).closest('li').removeClass('focused');
|
||||
});
|
||||
|
||||
/* Functions that need to run/rerun when active tabs are changed */
|
||||
$(document).on('shown.bs.tab', () => {
|
||||
// Resize autosize textareas
|
||||
// eslint-disable-next-line func-names
|
||||
$('textarea[data-autosize-on]').each(function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
autosize.update($(this).get());
|
||||
});
|
||||
});
|
||||
|
||||
/* tabs */
|
||||
const showTab = (tabButtonElem) => {
|
||||
$(tabButtonElem).tab('show');
|
||||
|
@ -419,16 +429,6 @@ $(() => {
|
|||
};
|
||||
}
|
||||
|
||||
/* Functions that need to run/rerun when active tabs are changed */
|
||||
$(document).on('shown.bs.tab', () => {
|
||||
// Resize autosize textareas
|
||||
// eslint-disable-next-line func-names
|
||||
$('textarea[data-autosize-on]').each(function () {
|
||||
// eslint-disable-next-line no-undef
|
||||
autosize.update($(this).get());
|
||||
});
|
||||
});
|
||||
|
||||
/* Debounce submission of long-running forms and add spinner to give sense of activity */
|
||||
// eslint-disable-next-line func-names
|
||||
$(document).on('click', 'button.button-longrunning', function () {
|
||||
|
|
|
@ -51,6 +51,7 @@ Bug fixes
|
|||
* Add handling of invalid inline styles submitted to ``RichText`` so ``ConfigException`` is not thrown (Alex Tomkins)
|
||||
* Ensure comment notifications dropdown handles longer translations without overflowing content (Krzysztof Jeziorny)
|
||||
* Set ``default_auto_field`` in ``postgres_search`` ``AppConfig`` (Nick Moreton)
|
||||
* Ensure admin tab JS events are handled on page load (Andrew Stone)
|
||||
|
||||
Upgrade considerations
|
||||
======================
|
||||
|
|
Ładowanie…
Reference in New Issue