mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix autozoom in codemirror editors on mobile
This commit is contained in:
parent
bad1170212
commit
fd6fa31ad9
@ -140,10 +140,15 @@ define([
|
||||
return text.trim();
|
||||
};
|
||||
|
||||
var isMobile = window.orientation || (typeof(screen) !== "undefined" && screen.orientation);
|
||||
|
||||
module.mkIndentSettings = function (editor, metadataMgr) {
|
||||
var setIndentation = function (units, useTabs, fontSize, spellcheck, brackets) {
|
||||
if (typeof(units) !== 'number') { return; }
|
||||
var doc = editor.getDoc();
|
||||
if (isMobile && fontSize < 16) {
|
||||
fontSize = 16;
|
||||
}
|
||||
editor.setOption('indentUnit', units);
|
||||
editor.setOption('tabSize', units);
|
||||
editor.setOption('indentWithTabs', useTabs);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user