qwen-code/packages/web-shell/client/interactionBlockContext.ts
jifeng fc77764f83
feat(web-shell): add cell value dialog on double-click in markdown tables (#6530)
* feat(web-shell): add cell value dialog on double-click in markdown tables

Double-clicking a table cell opens a modal dialog showing the cell's full
content with copy and close actions. The dialog clears any active selection
or row details on open, supports Escape to dismiss, and click-outside to
close. Adds EN/ZH i18n keys and four unit tests covering open, copy,
dismiss, and state-clearing behaviour.

* fix(web-shell): improve table cell dialog interactions

* fix(web-shell): portal table cell dialog

* fix(web-shell): block shortcuts behind cell dialog

---------

Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-07-11 15:21:34 +00:00

13 lines
436 B
TypeScript

import { createContext, useContext } from 'react';
export type RegisterInteractionBlocker = () => () => void;
const noopRelease = () => {};
const noopRegisterInteractionBlocker = () => noopRelease;
export const InteractionBlockContext =
createContext<RegisterInteractionBlocker>(noopRegisterInteractionBlocker);
export function useInteractionBlocker(): RegisterInteractionBlocker {
return useContext(InteractionBlockContext);
}