diff --git a/src/plugins/RTLPlugin.js b/src/plugins/RTLPlugin.js index c5c958e..cfcef3f 100644 --- a/src/plugins/RTLPlugin.js +++ b/src/plugins/RTLPlugin.js @@ -14,11 +14,22 @@ export default { this.isRTL = true; this.getDocClasses().add('rtl'); this.getDocClasses().add('menu-on-right'); + this.toggleBootstrapRTL(true); }, disableRTL() { this.isRTL = false; this.getDocClasses().remove('rtl'); this.getDocClasses().remove('menu-on-right'); + this.toggleBootstrapRTL(false); + }, + toggleBootstrapRTL(value) { + for (let i=0; i < document.styleSheets.length; i++){ + let styleSheet = document.styleSheets[i]; + let { href } = styleSheet; + if(href && href.endsWith('bootstrap-rtl.css')){ + styleSheet.disabled = !value; + } + } } } });