-
19 Jun 2012 12:50 AM #1
text-selection in TreePanel not working
text-selection in TreePanel not working
Hi,
we are using gxt 2.2.4 and try to enable text selection in TreePanels.
..but disableTextSelection(false) does nothing, TreePanel ignores the disableTextSelection-Flag.Code:treePanel.disableTextSelection(false);
Our next try was to change the rendering template of the TreeView and
a. replace unselectable=on with unselectable=off
b. remove the x-unselectable class
c. add the x-selectable class
We defined x-selectable and x-selectable * as followsCode:treePanel.setView(new TreePanelView(){ @Override public String getTemplate(ModelData m, String id, String text, AbstractImagePrototype icon, boolean checkable, boolean checked, Joint joint, int level, com.extjs.gxt.ui.client.widget.treepanel.TreePanelView.TreeViewRenderMode renderMode) { String tpl = super.getTemplate(m, id, text, icon, checkable, checked, joint, level, renderMode); if (tpl != null) { tpl = tpl.replace("unselectable=on", "unselectable=off"); tpl = tpl.replace("class=\"", "class=\"x-selectable "); } return tpl; } }); treePanel.removeStyleName("x-unselectable"); treePanel.addStyleName("x-selectable");
...but text selection isn't working...Code:.x-selectable, .x-selectable * { -moz-user-select: text !important; -khtml-user-select: text !important; -webkit-user-select: text !important; }
Is there another working approach to enable text selection?
This is a mandatroy request for our application and I think text selection should be kind of standard, not?
Thanks in advance,
Sebastian
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote