ExtJS qtip and messagebox issues, text is truncate

2019-09-18 12:59发布

问题:

I am using EXTJS 4 (4.2.1.883) and experiencing issues with qtips and message boxes, on different browsers (Chrome, IE and Firefox) the text is getting truncated at different lengths.

  1. qtips on textfields getting truncated at different lengths on different browsers, here is what I have set for one textfield, in firefox I would get 'New U'

    msgTarget: 'side', maxLength: 15 , enforceMaxLength: true, blankText: 'New UserName is required '

  2. Ext.Msg.show, the msg is getting truncated, different browsers are truncating text at different lengths, in some cases I can only see one or two lines of the msg and the remainder is not visible.

        Ext.MessageBox.show({
            title: 'There is an issue here', 
            msg:statusErrorMsg,
            buttons: Ext.MessageBox.OK
        });
    

Firefox seems to be the most badly behaved, followed by IE and then chrome.

My understanding was that EXTJS would handle such formatting issues but it is not behaving as expected, any ideas here on what am I doing wrong?

Thank You.

回答1:

Issue resolved by changing the message box to be Ext.Msg.show , the qtip issue is a bug in extjs 4.2 that has not been fixed (despite a few threads at Sencha claiming it is fixed), fix I made was to replace all the spaces, for example

blankText: 'New UserName is required'