diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2020-06-11 16:30:03 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2020-06-11 16:30:03 +0100 |
| commit | bda1784dac89be481a1661163824c3fee3f703af (patch) | |
| tree | b4255dd60376847b425b96c5a64a65bf40c201a5 /resources/js/vendor.js | |
| parent | 721d6ab16d2280a1c1d96737c44d2efb7dd1a4ef (diff) | |
| download | webtrees-bda1784dac89be481a1661163824c3fee3f703af.tar.gz webtrees-bda1784dac89be481a1661163824c3fee3f703af.tar.bz2 webtrees-bda1784dac89be481a1661163824c3fee3f703af.zip | |
Fix: #3332 - add workaround for lack of RTL support in bootstrap
Diffstat (limited to 'resources/js/vendor.js')
| -rw-r--r-- | resources/js/vendor.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/js/vendor.js b/resources/js/vendor.js index 30213a3609..0448d82bb8 100644 --- a/resources/js/vendor.js +++ b/resources/js/vendor.js @@ -146,3 +146,13 @@ window.Bloodhound = require('corejs-typeahead/dist/bloodhound.min.js'); // See https://github.com/RubaXa/Sortable/issues/1229 // window.Sortable = require('sortablejs'); window.Sortable = Sortable; + +// Add RTL support for dropdown menu - see https://github.com/fisharebest/webtrees/issues/3332 +$('html[dir=rtl] .dropdown').on('shown.bs.dropdown', function (event) { + let menu = event.target.querySelector('.dropdown-menu'); + // Bootstrap sets these *after* the event has fired, so wait before updating them. + setTimeout(function () { + menu.style.right='0'; + menu.style.left=''; + }, 1); +});
\ No newline at end of file |
