Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Clicking on custom toolbar dialog button works in all but the second time
posted

1. Created a custom toolbar dialog button with dialogContentID (let's say div1) pointing to a div on the page.

2. When the page loads, clicking on the button shows the content of div1. works fine. great!

3. Clicked on the editor again, dialog disappears (or could be any other action).

4. Clicked on the custom toolbar dialog button again.This time the Dialog Text appears (Type=InternalWindow). Should it display the div1 contents consistently?

5. Repeat item 3, click on the toolbar dialog button again, from here on it works consistently.

Ohh and another thing, if the div is located above the definition of the webHTMLEditor, it also behaves inconsistently.

Furthermore if the same dialog is being used by a custom toolbar button and also an html menuitem then same problem plus more inconsistency (not only on the second click)

Please look into this and let me know if I'm just missing something. Version is 7.3 

Attaching content of my test aspx page, (nothing on the *.cs code behind/file just an Page_Load). Also removed other toolbars for brevity.

<%@ Page AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Language="C#" %>

<%@ Register Assembly="Infragistics2.WebUI.WebHtmlEditor.v7.3, Version=7.3.20073.38, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebHtmlEditor" TagPrefix="ighedit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div id="div1" style="display: none; background-color: gray; padding: 5px;">Custom
                Dialog Content</div>
            <ighedit:WebHtmlEditor ID="WebHtmlEditor1" runat="server" FontFormattingList="Heading 1=<h1>&Heading 2=<h2>&Heading 3=<h3>&Heading 4=<h4>&Heading 5=<h5>&Normal=<p>"
                FontNameList="Arial,Verdana,Tahoma,Courier New,Georgia" FontSizeList="1,2,3,4,5,6,7"
                FontStyleList="Blue Underline=color:blue;text-decoration:underline;&Red Bold=color:red;font-weight:bold;&ALL CAPS=text-transform:uppercase;&all lowercase=text-transform:lowercase;&Reset="
                SpecialCharacterList="&#937;,&#931;,&#916;,&#934;,&#915;,&#936;,&#928;,&#920;,&#926;,&#923;,&#958;,&#956;,&#951;,&#966;,&#969;,&#949;,&#952;,&#948;,&#950;,&#968;,&#946;,&#960;,&#963;,&szlig;,&thorn;,&THORN;,&#402,&#1046;,&#1064;,&#1070;,&#1071;,&#1078;,&#1092;,&#1096;,&#1102;,&#1103;,&#12362;,&#12354;,&#32117;,&AElig;,&Aring;,&Ccedil;,&ETH;,&Ntilde;,&Ouml;,&aelig;,&aring;,&atilde;,&ccedil;,&eth;,&euml;,&ntilde;,&cent;,&pound;,&curren;,&yen;,&#8470;,&#153;,&copy;,&reg;,&#151;,@,&#149;,&iexcl;,&#14;,&#8592;,&#8593;,&#8594;,&#8595;,&#8596;,&#8597;,&#8598;,&#8599;,&#8600;,&#8601;,&#18;,&brvbar;,&sect;,&uml;,&ordf;,&not;,&macr;,&para;,&deg;,&plusmn;,&laquo;,&raquo;,&middot;,&cedil;,&ordm;,&sup1;,&sup2;,&sup3;,&frac14;,&frac12;,&frac34;,&iquest;,&times;,&divide;">
                <DownlevelLabel Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" />
                <DropDownStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" />
                <ProgressBar Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" />
                <DownlevelTextArea Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" />
                <TextWindow Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" />
                <Toolbar Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False">
                    <ighedit:ToolbarDropDown runat="server" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                        Font-Strikeout="False" Font-Underline="False" Type="FontStyle">
                    </ighedit:ToolbarDropDown>
                    <ighedit:ToolbarDropDown runat="server" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                        Font-Strikeout="False" Font-Underline="False" Type="Insert">
                        <Items>
                            <ighedit:ToolbarDropDownItem runat="server" Act="Greeting" Font-Bold="False" Font-Italic="False"
                                Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
                            <ighedit:ToolbarDropDownItem runat="server" Act="Signature" Font-Bold="False" Font-Italic="False"
                                Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
                        </Items>
                    </ighedit:ToolbarDropDown>
                    <ighedit:ToolbarDialogButton runat="server" Font-Bold="False" Font-Italic="False"
                        Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Key="CustomToolbarButton"
                        Type="Custom">
                        <Dialog DialogContentID="div1" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                            Font-Strikeout="False" Font-Underline="False" InternalDialogType="Text" Key="CustomDialog"
                            Text="Custom Dialog Text" Type="InternalWindow" />
                    </ighedit:ToolbarDialogButton>
                </Toolbar>
                <TabStrip Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" />
            </ighedit:WebHtmlEditor>
        </div>
    </form>
</body>
</html>

Parents
  • 24497
    posted

    Hi Ryan,

    If type of dialog is text and Text is set, then WebHtmlEditor creates drop-down element automatically. However, when you set DialogContentID, then your custom html element should be used. So, if you set both properties, then WebHtmlEditor on client has 2 conflicting references for drop-down element. I guess WebHtmlEditor better raise run-time exception if both properties are set.

    To fix, I suggest you to remove one of them and keep only Text or only DialogContentID.

Reply Children