On 12/16/2009 09:30 AM, Marius Dumitru Florea wrote: > Hi devs, > > Currently we have this behavior: > > * simple click to select a macro > * simple click to toggle between collapsed and expanded state of a > previously selected macro > * double click to edit the macro properties > > The problem is that the double click event consists, as its name > suggests, in two consecutive click events. As a consequence, when you > double click to edit a macro you also toggle its visibility state. > Besides being annoying, this can lead sometimes to an unexpected result: > > -----<details> ----- > I inserted a really long code macro (paste an entire Java source file). > and them selected the macro and double clicked somewhere in the middle > to edit its properties. This is what happened: > > * The first click event collapsed the macro > * The second click event was not fired on the macro but on document > body, because after the macro collapsed the place where I clicked was in > the middle of nowhere. As a result the macro was unselected. > * the (logical) double click event was still fired on the macro (I guess > because the target of the first click was the macro container) and thus > the edit macro dialog opened > * I changed the macro properties and closed the dialog. As a result the > macro was duplicated. The edit dialog should have replaced the selected > macro but there was no selected macro.. > -----</details> -----
+1 I hit this yesterday too but didn't know what happened, I thought I did something wrong (so that my content got messed up). > > Therefore I propose to use a modifier key with click to collapse/expand > a macro. I'm not sure which modifier key is the best. I think we should > choose between Alt and Meta. The behavior would become: > > * simple click to select a macro > * [Alt or Meta] + simple click to toggle the collapsed and expanded state > * double click to edit > > I'm +1 for Alt key. If it's not too much trouble, a +- button could be better as it is more intuitive. If it's a pain to implement (and not really a priority right now), then Meta key could do the job too. I'd go for meta since we're using meta as a modifier mostly and, as long as it is not conflicting with anything, I'd stick with it. Happy hacking, Anca > > WDYT? > > Thanks, > Marius > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

