Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    IE8 KeyPressFilter problem

    First of all, I apologize for my English.
    Application is not loaded in IE 8.0 using setKeyPressFilter("[]") in TextItem.

    In Chrome 14.0.835.186 and Firefox 5.0.1 works fine. I've tried to use <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"> and <meta http-equiv="X-UA-Compatible" content="IE=7"> and <meta http-equiv="X-UA-Compatible" content="IE=8">. Result is the same.

    Version: SC_SNAPSHOT-2011-10-04
    GWT: 2.3.0

    Console log:
    Code:
    12:54:16.851:INFO:Log:initialized
    12:54:16.851:INFO:Page:app dir is http://194.220.0.32:8080/SmartGWTIE8Problem/
    12:54:16.861:INFO:Page:SmartClient Core (SC_SNAPSHOT-2011-10-04/LGPL Development Only 2011-10-04) initialized: 10ms
    12:54:16.861:INFO:Page:document.compatMode: BackCompat
    12:54:16.861:INFO:loadTime:Core module init time: 10ms
    12:54:16.881:INFO:loadTime:Foundation module init time: 0ms
    12:54:16.891:INFO:loadTime:Containers module init time: 0ms
    12:54:16.971:INFO:loadTime:Grids module init time: 10ms
    12:54:17.031:INFO:loadTime:Forms module init time: 10ms
    12:54:17.041:INFO:loadTime:RichTextEditor module init time: 0ms
    12:54:17.041:INFO:loadTime:Calendar module init time: 0ms
    12:54:17.091:INFO:DataSource:Registered new isc.DataSource 'Object'
    12:54:17.091:INFO:DataSource:Registered new isc.DataSource 'ValueMap'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'DataSource'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'DataSourceField'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'Validator'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'SimpleType'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'XSComplexType'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'XSElement'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'SchemaSet'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'WSDLMessage'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'WebService'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'WebServiceOperation'
    12:54:17.101:INFO:DataSource:Registered new isc.DataSource 'WSOperationHeader'
    12:54:17.101:INFO:loadTime:DataBinding module init time: 10ms
    12:54:17.121:INFO:Log:isc.Page is loaded
    12:54:17.191:WARN:Log:Error:
    	'Expected ']' in regular expression'
    	in http://194.220.0.32:8080/SmartGWTIE8Problem/org.yournamehere.Main/sc/modules/ISC_Forms.js
    	at line 1968
        TextItem.init(Obj{name:isc_TextItem_0}, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef)
        Class.completeCreation(_1=>Obj{name:isc_TextItem_0}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
        DynamicForm.createItem(_1=>[TextItem ID:isc_TextItem_1 name:isc_TextItem_0], _2=>"TextItem")
        DynamicForm.$10l(_1=>Array[1], _2=>null, _3=>true, _4=>true)
        DynamicForm.setItems(_1=>Array[1], _2=>true)
        DynamicForm.initWidget(Obj{ID:isc_DynamicForm_0}, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef)
        Canvas.init(_1=>Obj{ID:isc_DynamicForm_0}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
        ** recursed on Class.completeCreation
    
    12:54:21.918:KDN4:INFO:EventHandler:keyDown event with Canvas target: undefined, native target: [BODYElement]{nodeName:BODY}

    See code in attachments.
    Attached Files
    Last edited by eugene_kr; 5 Oct 2011, 04:33.

    #2
    What are you hoping that that regexp would do? It seems to specify a character length of one but no characters are legal - technically a valid regexp (which never matches) and technically IE's bug for rejecting it, but what's the point?

    Comment


      #3
      Let me try to explain the idea. I want to disable printing of any characters, but I do not want to disable the field. More specifically, I want to prevent a user to change the current value (type or paste). I know it's not clear to the user. But I need to implement this behavior.
      - If I disable the field it will change the appearance.
      - If I use InputTransformer (returning the previous value) when the new symbol appears for a moment and then disappears.
      - If I use KeyPressHandler I need to check the buttons that do not change the value (Esc, Tab, Enter, ...).
      In general, the problem is not implementation the required behavior, but a different behavior in different browsers.
      The meaning of "[]" - "no characters". Not technically but in the sense. By analogy with the expression of only digits "[0-9]", but empty.
      I do not like the fact that in Chrome and Firefox the regexp works as expected. And in IE 8 application do not even start.
      Last edited by eugene_kr; 5 Oct 2011, 11:32.

      Comment


        #4
        Use ChangeEvent and cancel() the change.

        Comment


          #5
          Thanks a lot

          Comment

          Working...
          X