diff options
author | wreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-08-28 00:20:19 +0000 |
---|---|---|
committer | wreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-08-28 00:20:19 +0000 |
commit | 5aec9cb96c1d56e4aa44ebe9d623297c36f26cf0 (patch) | |
tree | 1ef2169e6531db86d8c2cc18566a016ee646ba9a /lib/Reaction/UI/ViewPort/Action.pm | |
parent | 7d742f8a0b38d58cbec5ece738c3bdf1873ddfb4 (diff) | |
download | reaction-5aec9cb96c1d56e4aa44ebe9d623297c36f26cf0.tar.gz reaction-5aec9cb96c1d56e4aa44ebe9d623297c36f26cf0.zip |
making reaction apply events for buttons defined as type=image
Diffstat (limited to 'lib/Reaction/UI/ViewPort/Action.pm')
-rw-r--r-- | lib/Reaction/UI/ViewPort/Action.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Reaction/UI/ViewPort/Action.pm b/lib/Reaction/UI/ViewPort/Action.pm index a19f2ca..84b127e 100644 --- a/lib/Reaction/UI/ViewPort/Action.pm +++ b/lib/Reaction/UI/ViewPort/Action.pm @@ -62,6 +62,17 @@ sub sync_action_from_fields { } } +after handle_events => sub { + my ($self, $events) = @_; + foreach my $event ($self->accept_events) { + unless (exists $events->{$event} ) { + # for <input type="image"... buttons + if ( exists $events->{"${event}.x"} && exists $events->{"${event}.y"} ) { + $self->$event($events->{$event}); + } + } + } +}; __PACKAGE__->meta->make_immutable; |