fix: an experiment on portal editing

This commit is contained in:
Peng Xiao
2022-08-17 15:53:14 +08:00
parent 880d7b02c8
commit fe8679da2e
2 changed files with 4 additions and 1 deletions

View File

@@ -721,7 +721,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
style={{
width: '100%',
height: '100%',
pointerEvents: isEditing ? 'all' : 'none',
pointerEvents: !isMoving && (isEditing || isSelected) ? 'all' : 'none',
}}
>
{isCreating ? (

View File

@@ -104,6 +104,9 @@ export class TranslatingState<
)
this.initialPoints = this.initialShapePoints
// Blur all inputs when moving shapes
document.querySelectorAll<HTMLElement>('input,textarea').forEach(el => el.blur())
if (inputs.altKey) {
this.startCloning()
} else {