mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
magicOffset only for Firefox and Safari
This commit is contained in:
parent
956228f4a1
commit
1a877fa8c7
1 changed files with 6 additions and 4 deletions
|
@ -11,7 +11,7 @@ import {
|
||||||
isBoundToContainer,
|
isBoundToContainer,
|
||||||
isTextElement,
|
isTextElement,
|
||||||
} from "./typeChecks";
|
} from "./typeChecks";
|
||||||
import { CLASSES, VERTICAL_ALIGN } from "../constants";
|
import { CLASSES, isFirefox, isSafari, VERTICAL_ALIGN } from "../constants";
|
||||||
import {
|
import {
|
||||||
ExcalidrawElement,
|
ExcalidrawElement,
|
||||||
ExcalidrawLinearElement,
|
ExcalidrawLinearElement,
|
||||||
|
@ -348,9 +348,11 @@ export const textWysiwyg = ({
|
||||||
});
|
});
|
||||||
|
|
||||||
const magicOffset =
|
const magicOffset =
|
||||||
(excalidrawContainer
|
isFirefox || isSafari
|
||||||
|
? (excalidrawContainer
|
||||||
? parseFloat(getComputedStyle(excalidrawContainer).fontSize)
|
? parseFloat(getComputedStyle(excalidrawContainer).fontSize)
|
||||||
: 16) / 8;
|
: 16) / 16
|
||||||
|
: 0;
|
||||||
|
|
||||||
const onEditableInput = () => {
|
const onEditableInput = () => {
|
||||||
const updatedTextElement = Scene.getScene(element)?.getElement(
|
const updatedTextElement = Scene.getScene(element)?.getElement(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue