diff options
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 |
