wanadev / PhotonUI

A javascript framework to create user interfaces
http://wanadev.github.io/PhotonUI/
BSD 3-Clause "New" or "Revised" License
63 stars 20 forks source link

Removing accels remove more than expected #73

Closed Breush closed 8 years ago

Breush commented 8 years ago

In the following example, "accel2" should still be active, but is not:

var label = new photonui.Label({text: ""});
photonui.domInsert(label, "demo");

var accel = new photonui.AccelManager();
accel.addAccel("accel1", "ctrl + a", function() {
    label.text += "1\n";
});
accel.addAccel("accel2", "ctrl + a", function() {
    label.text += "2\n";
});

accel.removeAccel("accel1");