[Kss-devel] Global state; was Re: Save inline form on pressing Escape

Godefroid Chapelle gotcha at bubblenet.be
Sun Mar 4 15:14:27 CET 2007


Godefroid Chapelle wrote:
> Hi
> 
> I just checked in some code for inline form without save cancel buttons.
> 
> I have built basic support for Cancel on pressing Escape.
> 
> Currently, pressing Escape will cancel only if the input has the focus.
> 
> This might not be enough : I have the feeling that pressing Escape 
> should globally cancel edit forms.
> 
> It is currently possible to have two (or more) inline forms activated.
> If we do not want Escape to cancel all inline forms, we need a way to 
> discriminate which form to cancel.
> 
> I'd like to hear opinions.
> 

I have the feeling that we need our events to trigger on stuff more 
specific than just the node.

Jeroen needed to setup some global state like (shift pressed).

I wonder if we could not have stuff like this:

input:keypress {
evt-keypress-keycodes : 27;
global-state-inlineform: active;
action-server : cancelForm;
}

This event would trigger only if the right global state is set. This 
feels like generic functions.

This mail is meant to start brainstorming.

/me waiting for feedback

-- 
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be



More information about the Kss-devel mailing list