fix browser zoom while editing text (#802)
This commit is contained in:
parent
b0755d8def
commit
e6d3074f90
3 changed files with 11 additions and 2 deletions
|
@ -108,7 +108,9 @@ export class StickyUtil extends TDShapeUtil<T, E> {
|
|||
e.preventDefault()
|
||||
return
|
||||
}
|
||||
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === '=') {
|
||||
e.preventDefault()
|
||||
}
|
||||
if (e.key === 'Tab') {
|
||||
e.preventDefault()
|
||||
if (e.shiftKey) {
|
||||
|
|
|
@ -103,6 +103,7 @@ export class TextUtil extends TDShapeUtil<T, E> {
|
|||
...shape,
|
||||
text: newText,
|
||||
})
|
||||
|
||||
switch (shape.style.textAlign) {
|
||||
case AlignStyle.Start: {
|
||||
break
|
||||
|
@ -162,7 +163,9 @@ export class TextUtil extends TDShapeUtil<T, E> {
|
|||
e.preventDefault()
|
||||
return
|
||||
}
|
||||
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === '=') {
|
||||
e.preventDefault()
|
||||
}
|
||||
if (e.key === 'Tab') {
|
||||
e.preventDefault()
|
||||
if (e.shiftKey) {
|
||||
|
|
|
@ -65,6 +65,10 @@ export const TextLabel = React.memo(function TextLabel({
|
|||
return
|
||||
}
|
||||
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === '=') {
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
if (e.key === 'Tab') {
|
||||
e.preventDefault()
|
||||
if (e.shiftKey) {
|
||||
|
|
Loading…
Reference in a new issue