Hi, i use below code to show node's perperties this.properties = new mxWindow('properties', table, x, y, this.propertiesWidth, this.propertiesHeight, false,true,null,null); this.properties.setVisible(true);

The table is a simple html table created by document and with some html input elements in it. when i create 'text' or 'textarea' element and append it to the table, the two type element can't get any mouse focus(click,dobuleclick,select), but other input element(such as radio, checkbox) can work with mouse. in the other side, the two element can work with keyboard operation such as Tab key.

when i use Dialog in the editor example to show the table, the two element can work with mouse operation. is there any one can help me or any solution?

Thinks in advance! Regards from Beck

This question is marked "community wiki".

asked 30 Oct '12, 23:24

Beck's gravatar image

Beck
01
accept rate: 0%

Can you provide a small test case? Which browser are you using?

(31 Oct '12, 06:57) Gaudenz

Actually, I have done some modifications for demo grapheditor. for examle, in the Actions.js for the print action add below code: this.addAction('print', function() { // ui.showDialog(new PrintDialog(ui).container, 300, 200, true, true); var divCon = document.createElement('div'); var input = document.createElement('textarea'); input.setAttribute('rows', 9); input.setAttribute('cols', 40); input.value = 'test textarea'; input.name = 'textareaName'; divCon.appendChild(input); var properties = new mxWindow(mxResources.get('properties',null,'properties'), divCon, 50, 50, 310, 300, false,true,null,null); properties.setVisible(true); }, null, 'sprite-print', 'Ctrl+P');

Open the editor with browser and click the print action in toolbar you will see the dialog with the problem textarea UI. This issue can reproduce with chrome, firefox or IE.

(01 Nov '12, 02:51) Beck

Hi I found running the grapheditor demo to reproduce this issue there miss images common.css and submenu.gif, maximize.gif, minimize.gif, close.gif, show you need copy these file to the src directory. You can check browser's console output.

(01 Nov '12, 03:36) Beck

It seems this issue only reprodue with grapheditor and using mxWindow to show the textarea or text element. I simplely change the index.html as below code reproduce it. but if I create a new page without the grapheditor, it can work!

    <script type="text/javascript">
        var onloadFunc = function() { 
      // ui.showDialog(new PrintDialog(ui).container, 300, 200, true, true);
        var divCon = document.createElement('div');
        var input = document.createElement('textarea');
        input.setAttribute('rows',  9);
        input.setAttribute('cols',  40);
        input.value = 'test textarea';
        input.name = 'textareaName';
        divCon.appendChild(input);
        var properties = new mxWindow(mxResources.get('properties',null,'properties'), divCon, 50, 50, 310, 300, false,true,null,null);
        properties.setVisible(true);
      }
    </script>

<body class="geEditor" onload="onloadFunc()">

(01 Nov '12, 03:56) Beck

Probably related to EditorUi.js lines 17-37. To fix it, override EditorUi.isSelectionAllowed and return true if an mxWindow is showing.

link

answered 01 Nov '12, 04:00

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Yes, you are right! Thanks a lot!

(01 Nov '12, 04:15) Beck
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×9

Asked: 30 Oct '12, 23:24

Seen: 1,618 times

Last updated: 01 Nov '12, 04:15