[CLOSED] Problem with selectbox under IE

  1. #1

    [CLOSED] Problem with selectbox under IE

    There is a problem with selectbox under IE: if you select it with the mouse and press the space bar, a javascript error is thrown.
    The error can be reproduced in this link:
    https://examples1.ext.net/#/Form/ComboBox/SelectBox/

    I've tested under IE9 with and without compatibility mode, in both the error occurred. Under Firefox 5 it doesn't occur.
    Last edited by Daniil; Aug 02, 2011 at 2:06 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Reproduced, thanks for the report.

    We are investigating.
  3. #3
    The bug ticket has been created.
    https://extnet.lighthouseapp.com/pro...gs/tickets/172

    The fix has been added to SVN, revision #3675.

    Please update and re-test.

    Thanks again for the report.
  4. #4
    Daniil, updating from svn now is not an option for us, because the whole application would have to be re-tested. Some time ago we had a problem with tabpanel under the same circumstances and you provided us a way to override just the piece of code that changed to sovle the bug using Ext.TabPanel.override;
    Could you provide us a similar way to solve this problem?

    Thanks in advance.
  5. #5
    Here you are.

    Example

    <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    <script type="text/javascript">
        Ext.ux.form.SelectBox.override({
            keySearch : function (e, target, options) {                
                var raw = e.getKey();
                var key = String.fromCharCode(raw);
                var startIndex = 0;
    
                if ( !this.store.getCount() ) {
                    return;
                }
    
                switch(raw) {
                    case Ext.EventObject.HOME:
                        e.stopEvent();
                        this.selectFirst();
                        return;
    
                    case Ext.EventObject.END:
                        e.stopEvent();
                        this.selectLast();
                        return;
    
                    case Ext.EventObject.PAGEDOWN:
                        this.selectNextPage();
                        e.stopEvent();
                        return;
    
                    case Ext.EventObject.PAGEUP:
                        this.selectPrevPage();
                        e.stopEvent();
                        return;
                }
    
                // skip special keys other than the shift key
                if ( (e.hasModifier() && !e.shiftKey) || e.isNavKeyPress() || e.isSpecialKey() || (raw >= e.F1 && raw <=e.F12)) {
                    return;
                }
                if ( this.lastSearchTerm === key ) { //replaced == with ===
                    startIndex = this.lastSelectedIndex;
                }
                this.search(this.displayField, key, startIndex);
                this.cshTask.delay(this.searchResetDelay);
            }
        });
    </script>
  6. #6
    The fix has been improved to cover all cases.
    https://extnet.lighthouseapp.com/pro...gs/tickets/172

Similar Threads

  1. [CLOSED] SelectBox: Problem with characters "<" and ">"
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 03, 2011, 6:43 AM
  2. Replies: 4
    Last Post: Oct 24, 2011, 3:34 AM
  3. Replies: 4
    Last Post: May 31, 2011, 3:53 PM
  4. Problem with SelectBox example...
    By Tanielian in forum 1.x Help
    Replies: 12
    Last Post: Apr 27, 2011, 12:50 PM
  5. SelectBox DataBind problem
    By vooka in forum 1.x Help
    Replies: 2
    Last Post: Jul 11, 2010, 4:36 AM

Posting Permissions