Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    18
    Vote Rating
    1
    Olaus is on a distinguished road

      0  

    Default Custom ToolTip to heigh

    Custom ToolTip to heigh


    (Beta 2) I'm trying to customize a tooltip, but the tooltip gets to heigh.
    It looks like this.

    tipNotOk.PNG
    But should look like this

    tipOk.PNG

    TestCase:
    Code:
    public class ToolTipTest {
     public interface Renderer extends ToolTipConfig.ToolTipRenderer<String>,
       XTemplates {
      @Override
      @XTemplate("<div>TEST</div>")
      public SafeHtml renderToolTip(String data);
     }
     public void setup() {
      TextButton button = new TextButton("test");
      ToolTipConfig ttc = new ToolTipConfig();
      Renderer renderer = GWT.create(Renderer.class);
      ttc.setRenderer(renderer);
      ttc.setCloseable(true);
      button.setToolTipConfig(ttc);
      RootPanel.get().add(button);
     }
    }

  2. #2
    Sencha User PhiLho's Avatar
    Join Date
    Nov 2011
    Location
    Near Paris, France
    Posts
    140
    Vote Rating
    1
    PhiLho is on a distinguished road

      0  

    Default


    I tried your code. The problem is that your template is rendered in a <span> element, which can accept only inline children, so the generated code is incorrect (at least for XHTML).
    With a @XTemplate("<span>TEST</span>"), it is displayed correctly.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    18
    Vote Rating
    1
    Olaus is on a distinguished road

      0  

    Default


    Thanks for the responce.
    The problem is my custom tip is more complex than the one in the testcase. It contains some nested divs.
    (I used <span> to produce the "correct" screenshot)

    The problme is also visible in the explorer demo for the custom toolip
    http://sencha.com/examples-dev/#ExamplePlace:tooltips

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    18
    Vote Rating
    1
    Olaus is on a distinguished road

      0  

    Default


    I got this working now.
    My workaround was to create a custom TipAppearence with my own template where the span is replaced by a div.
    I still think it's a bug that should be corrected.

Thread Participants: 1