Completed
Last Updated: 08 Sep 2020 13:06 by ADMIN
Release R3 2020
Annette
Created on: 25 Jun 2020 08:39
Category: ToolBar
Type: Bug Report
1
RadToolBarDropDown in ToolBar does not expand when there are two form tags on the page
Cookie law loads a <form> tag before the <form> tag of the framework, hence the dropdown is placed in the hidden cookie form instead of the correct one.
1 comment
ADMIN
Peter Milchev
Posted on: 25 Jun 2020 08:45

Hello,

Thank you for reporting this issue. As a temporary workaround, you can use on the of the two following options:

In the meantime, you can use one of the following approaches to workaround it:

1) Use a script that moves the cookie form after the framework's form:

 

<script type="text/javascript">
    Sys.Application.add_load(function () {
        var setIntervalFIX = setInterval(function () {
            var opt = $telerik.$("#optanon");
            if (opt.length > 0) {
                $telerik.$(document.body).append(opt);
                clearInterval(setIntervalFIX);
            }
        }, 500);
    });  
</script>

 

2) Place the following script under the script manager to override the built-in functionality and look for the from that contains the ToolBar

 

Telerik.Web.UI.RadToolBarItem.prototype._detachDropDown =  function() {
    if (this._detached)
        return;

    this._dropDownPositionKeeperElement = document.createElement("span");
    var dropDownElement = this.get_animationContainer();
    dropDownElement.parentNode.insertBefore(this._dropDownPositionKeeperElement, dropDownElement);

    if (!Sys.UI.DomElement.containsCssClass(dropDownElement, this.get_toolBar()._cssClass))
        $telerik.addCssClasses(dropDownElement, [this.get_toolBar()._cssClass]);

    //var rootParent = document.forms[0] || document.body;
    var rootParent = $telerik.$(this.get_toolBar().get_element()).closest("form")[0] || document.body;
    rootParent.insertBefore(dropDownElement, rootParent.firstChild);

    this._detached = true;
}

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.