Jump to content

TUnimEdit popup at tapped position


nimarufa

Recommended Posts

Please advice!

I need poput text edit window on click at HTML Frame at the clicked position. I'd found two ways how to do it on desktop. One way is pure ExtJS. But no one works on mobile.

This code I call via JSInterface.JSAdd

var popup=Ext.create('Ext.panel.Panel', {
centered: true,
//      modal: true,
//      hideOnMaskTap: true,
items: [{
	xtype: 'textfield',
    value: 'EditText',
    name: 'edRange',
    clearable: false,
    enableKeyEvents: true,
    listeners: {
    	painted: function(element, eOpts) {element.focus();},
        blur: function(thisEdit, e){popup.destroy();},
        keyup: function(thisField, e){
           		if(e.browserEvent.keyCode==27){popup.destroy();};
            //    if(e.browserEvent.keyCode==13){ajaxRequest(<popup.parent>,'_edit_range_done',['text='+thisField.getValue()]); popup.destroy();};
        }
      }
    }],
});
Ext.Viewport.add(popup);

But the problem is the popup panel with the edit is always centered. If change 'centered' property to false the popup doesnt appear.

I'm attaching test sample.There is desktop(2 versions) and moble version. Please some advice.

UniGUI 1.70.0.1485.

 

 

RuntimeEditTest.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...