Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix:网页面板下,右侧pin的面板拖拽事件丢失问题 || fix: Under the web page panel, the panel drag event on the right pin is lost #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
oathll wants to merge 1 commit into msgbyte:master
base: master
Choose a base branch
Loading
from oathll:master

Conversation

@oathll
Copy link

@oathll oathll commented Aug 25, 2023
edited by github-actions bot
Loading

undefined


null

@github-actions github-actions bot changed the title (削除) fix:网页面板下,右侧pin的面板拖拽事件丢失问题 (削除ここまで) (追記) fix:网页面板下,右侧pin的面板拖拽事件丢失问题 || fix: Under the web page panel, the panel drag event on the right pin is lost (追記ここまで) Aug 25, 2023
});

export const dragActions = globalSlice.actions;
export const dragReducer = globalSlice.reducer;
Copy link
Contributor

@moonrailgun moonrailgun Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its looks like should not create a new slice and should merge into uiSlice.

}

const initialState: DragState = {
isDraging: false,
Copy link
Contributor

@moonrailgun moonrailgun Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its should be isDragging

@@ -0,0 +1,27 @@
import { useAppSelector ,useAppDispatch} from './useAppSelector';
import {dragActions} from '../slices/drag'
Copy link
Contributor

@moonrailgun moonrailgun Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why your code not auto format? did you skip github hooks manual?

const ref = useRef<HTMLIFrameElement>(null);
const [spinning, setSpinning] = useState(true);

conststatus=useDragstatus()
Copy link
Contributor

@moonrailgun moonrailgun Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An important problem is component Webview is a pure component and should not dependency with redux. redux has a scope in main route, the other route not use redux anywhere and not need it.

This code will restrict this component must be render under redux context.

My suggestion is change pin logic, and overlay a translucent div on both sides of the drag bar. To make sure drag event not send into iframe

* 更新
*/
const updateStatus= useMemoizedFn((status: boolean) => {
setStatus(status);
Copy link
Contributor

@moonrailgun moonrailgun Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can direct call dispatch(dragActions.setDragStatus(status)). and suggest replace useMemoizedFn with useEvent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@moonrailgun moonrailgun moonrailgun left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /