visv / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

RichTextItem Backspace not working if focus comes from FormItem with setCanEdit(false) #715

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here is my standalone testcase:

  public void onModuleLoad() {

    VLayout layout = new VLayout();
    layout.setHeight100();
    layout.setWidth100();
    DynamicForm form = new DynamicForm();
    TextItem textItem = new TextItem("Text");
    textItem.setValue("Some text");
    textItem.setCanEdit(Boolean.FALSE);
    RichTextItem richTextItem = new RichTextItem("RichText");
    richTextItem.setValue("Please edit me and try to use backspace after focus moved from Text field...");
    form.setFields(new FormItem[] { textItem, richTextItem });
    layout.addMember(form);
    layout.draw();
  }

What steps will reproduce the problem?
1. Run the above example code
2. Click into the RichTextItem and edit the text, Backspace is working
3. Click into the TextItem and then move focus to RichTextItem, Backspace is 
NOT working anymore.

What is the expected output? What do you see instead?
Backspace should work in any case inside RichTextItem

What version of the product are you using? On what operating system?
I use SmartGWT 3.1. But I also tried this with SmartGWT 4.0d with the same 
result. My OS is Windows7.

What browser(s) does this happen in?  Are there any browsers where the
issue does not occur?
Browser is FF 21.0. Same effect in all other browsers I have tried (IE, 
Chrome). In IE additionally I get this error:
Unable to get value of the property 'canEdit': object is null or undefined' in 
...ISC_Forms.js at line 497

Please provide any additional information below.
http://forums.smartclient.com/showthread.php?p=105679#post105679

Original issue reported on code.google.com by joerg.ho...@googlemail.com on 11 Jun 2013 at 11:17