diysimon opened a new pull request, #21826:
URL: https://github.com/apache/echarts/pull/21826

   ## Brief Information
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   ### What does this PR do?
   
   Stops renderer dragging when the mouse is released over enterable HTML 
tooltip content.
   
   ### Fixed issues
   
   Closes #20817.
   
   ## Details
   
   ### Before: What was the problem?
   
   Start panning a graph on the canvas, move onto an enterable tooltip, release 
the mouse, and move back onto the canvas: the graph continues to pan. The 
tooltip's `domBelongToZr` marker causes zrender's document listener to skip the 
release, leaving both the roam controller and document capture active.
   
   ### After: How does it behave after the fixing?
   
   For a press originating in the renderer, tooltip releases clear capture and 
deliver one mouseup. Ordinary tooltip interactions remain available, without 
synthesizing clicks or preventing native defaults.
   
   When `appendTo` places the tooltip inside the renderer event root, normal 
bubbling gets the first chance to handle the release. A zero-delay fallback 
handles a child that stops propagation. Native mouseup, a new renderer 
mousedown, and tooltip disposal cancel that fallback.
   
   No public API or zrender repository change is introduced. The implementation 
uses the existing internal `HandlerDomProxy` capture fields and 
`__togglePointerCapture` method in zrender 6.1.0. A proxy without that method 
is skipped; arbitrary custom-proxy capture semantics are not implemented. This 
internal coupling and the deferred nested-release path warrant review.
   
   ## Document Info
   
   - [x] This PR doesn't relate to document changes
   - [ ] The document should be updated later
   - [ ] The document changes have been made in apache/echarts-doc#xxx
   
   ## Misc
   
   ### Security Checking
   
   - [ ] This PR uses security-sensitive Web APIs.
   
   The runtime change adds event handling only. The manual fixture uses fixed, 
locally authored HTML content.
   
   ### ZRender Changes
   
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   - `test/ut/spec/component/tooltip/enterable.test.ts`: 28 DOM regressions 
covering canvas/SVG, default/external/nested appendTo, mouse/pointer releases, 
stopped bubbling, repeated drags, release before capture, outside release, 
non-enterable content, cancellation and missing custom-proxy methods.
   - `test/tooltip-enterable-roam.html`: interactive reproduction and control 
checks.
   
   Validation on macOS against master 
`34f4d927eafe251f26f63afd3aeefa30f2feba30`:
   
   - `npm test -- --runInBand --coverage=false`: 27 suites, 222 tests passed.
   - `npm run checktype`, `npm run lint:nocache`, `npm run checkheader`, `npm 
run build:lib`, `npm run test:dts:fast`: passed.
   - Fresh Rollup bundle and Chrome browser automation: 16 original 
before/after configurations and 8 nested first-fix/final configurations, three 
drag cycles per configuration; button, link and text-selection behavior 
checked. Drag releases did not add renderer clicks.
   - Baseline regression check from development: the same 28 tests on 
unmodified master produced 16 failures and 12 passes; all 28 pass with this 
change.
   
   Limitations: native Windows Edge, Firefox, Safari and touch/pen hardware 
were not tested. Pointer routing has synthetic DOM coverage. The nested 
stopped-propagation fallback completes in a later task. Native control-click 
bubbling when a tooltip is deliberately placed inside the renderer remains 
unchanged; this is not blanket suppression of renderer clicks. The full visual 
suite and full release matrix were not run.
   
   ### Merging options
   
   - [x] Please squash the commits into a single one when merging.
   
   ### Other information
   
   AI tooling disclosure: OpenAI Codex was used to develop the implementation, 
tests and this description. The commit includes a `Generated-by: OpenAI Codex` 
provenance trailer. No claim of independent human code review is made here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to