Completed
Last Updated: 12 Dec 2018 10:34 by ADMIN
ADMIN
Rumen
Created on: 12 Dec 2018 07:29
Category: FormDecorator
Type: Bug Report
0
Inability to delete content on IE11 if the mouse leaves textbox boundaries
Steps to reproduce:
1. Load https://demos.telerik.com/aspnet-ajax/formdecorator/examples/overview/defaultcs.aspx on IE 11
2. Input two lines in the textarea
3.  Select the second line from right to left by holding the left mouse button and releasing it when the cursor is outside of the text area


4. Press button 'delete' from keyboard with multi select content 
=> result: Can not delete content


5. Press button 'backspace' from keyboard 
=> result: back from url....


The problem happens only in IE when there is a select element on the page and when the mouse goes outside the boundaries of the textarea.

Temporary fix:
       <telerik:RadFormDecorator RenderMode="Lightweight" ID="FormDecorator1" runat="server" DecoratedControls="all"></telerik:RadFormDecorator>
        <script>
            Telerik.Web.UI.RadFormDecorator.prototype._selectBodyClickHandler = function (e) {


                var target = e.target;


                //in chrome the A element is not focused by default
                if (!Telerik.Web.Browser.ie &&target && target.focus && target !== document.activeElement) {
                    try {
                        target.focus();
                    } catch (ex) { }
                }


                if ($telerik.isTouchDevice) {
                    while (target.nodeType != 1 && target.nodeType != 9)
                        target = target.parentNode;
                }


                //See if an optGroup label
                if (this._isSelectOptgroup(target)) {
                    //Do nothing
                    return;
                }


                //Check if clicked on a box
                var box = this._getDecoratedSelectBoxParent(target);


                if (box) {
                    if (this._isSelectElementDisabled(box) || box === target) return;
                    else this._optionClickHandler(e);
                    if (box.setActive && box.style.visibility != "hidden") box.setActive();
                    return;
                }


                //Check if clicked on a select header
                var header = this._getDecoratedSelectHeaderParent(target);
                if (header) {
                    if (this._isSelectElementDisabled(header)) return;
                    else this._expandHeader(header);


                    if (header.setActive) header.setActive();
                    if (header.focus) header.focus();
                    return;
                }


                //else - just hide the popup
                this._hideSelectPopup();
            }
        </script>
0 comments