Odd Behavior with Input in dhtmlxMenu

I have two input fields in a dhtmlxMenu. They are created like this…

menu.addNewSibling("signout", "fastMenu", '<input type="text" id="fastMenuInput" size="6" value="Menu" style="color:darkgray">');
menu.addNewSibling("fastMenu", "fastFind", '<input type="text" id="fastFindInput" size="6" value="Find" style="color:darkgray">');

The strange behavior is that in IE after you type some text into the fields you cannot select the text. You can only backspace one character at a time. In Chrome you can select the text then remove it all at once with a single backspace. But in both Chrome and IE you cannot right-click in the field and get a normal browser context menu to appear.

I need to be able to select the text in IE like I can in Chrome and would like to have context menu capability also. Is this possible. Here are two screen shots of what I’m talking about…


after menu init add once:


then for certain item:

menu.idPull[menu.idPrefix+"fastMenu"].onselectstart = null;

Thanks but how do I get the mouse right-click context menu to appear? I’ve tried all of these but can’t get it to work…

[code]//Try getting the DHTMLX menu item…
mainMenu.idPull[mainMenu.idPrefix + “fastFind”].oncontextmenu = null;

//Try getting the actual input field that is in the DHTMLX menu…
document.getElementById(“fastMenuInput”).oncontextmenu = function(){};
document.getElementById(“fastMenuInput”).oncontextmenu = null;

//Try everything…
document.oncontextmenu = function(){}[/code]
None worked. Thanks!

Try to use a code like next

var inps = menu.base.querySelectorAll("input"); for (var i=0; i<inps.length; i++) inps[i].onselectstart=function(e){ (e||event).cancelBubble =true; }


That worked! However it took me a second to notice your typo, it should be oncontextmenu, not onselectstart. Thanks!