Results 1 to 2 of 2

Thread: NumberField ignores Focus/Blur event when marked as readonly

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-3231 in 3.1.1.
  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    22

    Default NumberField ignores Focus/Blur event when marked as readonly

    NumberField seems to ignore Focus/Blur-events when marked as readonly. Seemed odd to me.
    Code:
    Grid grid = new Grid(0, 2);
        @Override
        public Widget asWidget() {
            add(new TextField(), true);
            add(new NumberField(new NumberPropertyEditor.BigDecimalPropertyEditor()), true);
            add(new NumberField(new NumberPropertyEditor.BigDecimalPropertyEditor()), false);
            return grid;
        }
    
    
        private void add(ValueBaseField field, boolean readOnly) {
            grid.insertRow(grid.getRowCount());
            final Label label1 = new Label("Focussed");
            label1.setVisible(false);
            field.setReadOnly(readOnly);
            field.addFocusHandler(new FocusEvent.FocusHandler() {
                @Override
                public void onFocus(FocusEvent event) {
                    label1.setVisible(true);
                }
            });
            field.addBlurHandler(new BlurEvent.BlurHandler() {
                @Override
                public void onBlur(BlurEvent event) {
                    label1.setVisible(false);
                }
            });
            grid.setWidget(grid.getRowCount() - 1, 0, field);
            grid.setWidget(grid.getRowCount() - 1, 1, label1);
        }
    Last edited by EthiC; 30 Aug 2013 at 5:11 AM. Reason: Requirements changed, don't need a solution for this yet.

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    Thanks for the report. I will move this thread to the bugs forum and push it into the tracking system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •