Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1934

Tooltip causing error, when positioning, when component is replaced at the same time


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.4
    • 6.5.3
    • Components
    • Security Level: Jimmy

      Reproducing sample:

      	<popup id="help" onOpen='help.appendChild(new Label("dynamic help text"));' />
      	<div id="container">
      		<button tooltip="help, after_start" label="click to replace" 
      			onClick='container.getChildren().clear(); container.appendChild(new Label("replaced button"));' >

      The button has a tooltip, with positioning after_start.
      Clicking the button will replace the content of its surrounding container (usecase e.g. like clicking a button in a listbox -> switches to a details view)

      When hovering the button, the tooltip with dynamic content will open after a short delay and after a server roundtrip - OK.
      when clicking the button at the "wrong time" (while the tooltip is loading), a client error is caused (reproduced in chrome and IE so far)

      (I could not reproduce without "after_start", I think the positioning is important, because the mouse event will be received by the tooltip instead of the button, if no specific position is used).

      Uncaught TypeError: Cannot read property 'style' of undefined zk.wpd:10978
      zjq.dimension zk.wpd:10978
      zul.wgt.Popup.zk.$extends._posInfo zk.wpd:23538
      zul.wgt.Popup.zk.$extends.open zk.wpd:23459
      zk.override.open zk.wpd:25225
      _tt_open_ zk.wpd:20297
      (anonymous function)

      It might take several attempts to reproduce, see the following screencast http://screencast.com/t/eeII2ltg3

            RaymondChao RaymondChao
            cor3000 cor3000
            0 Vote for this issue
            0 Start watching this issue