View Full Version : text selection in 'center' during menu select

10 Jul 2009, 3:10 PM

I have a center panel with editable content, with words wrapped in spans with ids, so that I can deduce the words that are selected in Firefox.

Now, what I want the user to be able to do is to select a range of words in the 'center' panel and then apply an editable action to them, which will cause those words to be wrapped in another span that has an onclick attribute.

My two ideas for doing this seem to be both defeated in this framework, a context menu in the 'east' region, and a regular menu in the 'north' region. What happens is that when you select the text in 'center' to have an action applied, the browser shows it selected. But when you click on a menu item in the 'north', or click on a context item of a tree panel in 'east', your html text selection in 'center' disappears before the menus drop down.

Any ideas on how I can get menus in other panels to function without causing a user html selection in the 'center' region to disappear first? Or other ways to apply an action from a menu item to text selected in the base document?


10 Jul 2009, 3:34 PM
By the way, I was hoping there would be an event fired as soon as the menu is clicked and before ExtJS causes Firefox to deselect the document text. But I can't figure out what these events are.

Especially for the context menu.

11 Jul 2009, 4:49 AM
It's like deja vu all over again.

This is the second ime I've read this stuff.