diff --git a/src/widgets/call-panel.jsx b/src/widgets/call-panel.jsx index 83717ba2..a8788adc 100644 --- a/src/widgets/call-panel.jsx +++ b/src/widgets/call-panel.jsx @@ -163,11 +163,15 @@ class CallPanel extends React.PureComponent { // Fullscreen connected video call: let the user drag their own small self-view preview // out of the way instead of it being stuck wherever it defaults to (spec 8.9 "双方视频 // 通话中": "小窗应支持拖动且不能遮挡关键按钮"). Only relevant when the box actually exists - // (base.css hides it entirely for audio-only calls / while minimized via + // (base.css hides it entirely for audio-only calls / while minimized, and now also while + // still ringing -- see the render()'s `disabled` prop just below -- via // .call-party.self[disabled]) and only when the drag actually starts on that box, not on - // the peer's video/avatar card behind it. - if (!this.props.minimized && !this.state.audioOnly && this.selfBoxRef.current && - event.target.closest('.call-party.self')) { + // the peer's video/avatar card behind it. The `this.state.remoteStream` check mirrors + // render()'s own `connected` gate: without it, a pointerdown during the pre-connect ringing + // phase (box still hidden by CSS, but not yet [disabled] before this fix) would already set + // dragTarget='self' and start moving an invisible box. + if (!this.props.minimized && !this.state.audioOnly && this.state.remoteStream && + this.selfBoxRef.current && event.target.closest('.call-party.self')) { event.stopPropagation(); const el = this.selfBoxRef.current; // Pointer events are captured on the outer container (same element the listeners below @@ -956,7 +960,7 @@ class CallPanel extends React.PureComponent {