EnableFilteringOnEnterPressed In Firefox Possible Bug

2 posts, 0 answers
  1. Paul Herzberg
    Paul Herzberg avatar
    20 posts
    Member since:
    Jun 2010

    Posted 05 Jun 2013 Link to this post


    If I choose the following for RadfileExplorer:

     EnableFilterTextBox="true" EnableFilteringOnEnterPressed="true"

    When I go straight to the text box and enter a term, the "Back" button gets focus and nothing else seems to happen, but only in Firefox. IE10 works as you would expect.

    If it helps here is some background. The company I work for is using the Fileexplorer as part of an editting tool. The Fileexplorer allows our users access to files that they have uploaded to the companies CMS system.

    I have created a Filesystemprovider that gives access to files depending on the user and where they are accessing the editting tool.

    I have extended this provider to have information about the default "alternative text" for images and store this in the FileItem.Path variable as a csv variable. The path looks like this:

    Uploads/2350|0|0|ALTDESC|1|15.01.2013 16:49:47|0

    I've bolded the information I want to using in the filter.

    The whole thing breaks down like this: virtual path / fileid | height | width | alt description | boolval| upload date | boolval

    So, in order to filter with this extra field I have to catch the filter command and then do a postback of my own, because the FilterText value is inaccessable in the code behind I have to put this in a hidden field, this I do like so:

    function explorerFilterHandler(explorer, args)
    	hField = $get("<%= explorersFilterValue.ClientID%>");
    	hField.value = args.get_text();
    	__doPostBack(hField.name, "");

    As per another forum post.

    Because the filter text is deleted on postback I have to refill the text box and then set the cursor to the end of the text once the OnClientLoad of the FileExplorer is fired (Onclientload = "setFilter"):

             function setFilter(){   
                var hField  = $get("<%= explorersFilterValue.ClientID%>");
                if(hField.value != ''){
                    var filter = $('input[id$="FilterTextBox"]');
                    setSelectionRange(filter[0], hField.value.length, hField.value.length);
            function setSelectionRange(input, selectionStart, selectionEnd) {
                if (input.setSelectionRange) {
                    input.setSelectionRange(selectionStart, selectionEnd);
                else if (input.createTextRange) {
                    var range = input.createTextRange();
                    range.moveEnd('character', selectionEnd);
                    range.moveStart('character', selectionStart);

    Because this postback can be slower than a typist can put in the letters this can mean text disappears if the user is not careful, so it was decided the use the EnableFilteringOnEnterPressed setting.

    I thought that, perhaps, the error could have been caused by all this extra work, but it seems when I add a simple FileExplorer to a different page, the same thing happens.

    It may simply be that I have missed something.

    Thank you for your help in this matter.

  2. Vessy
    Vessy avatar
    1351 posts

    Posted 10 Jun 2013 Link to this post

    Hi Paul,

    Thank you for bringing this issue to our attention.

    I managed to reproduce it on our side and I have logged it into our bug - tracking system. Unfortunately I am not able to provide any suitable workaround for the moment.

    As a small token of gratitude for your report I have updated your Telerik points.

    Veselina Raykova
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top