-
Bug
-
Resolution: Fixed
-
Normal
-
3.0.0 RC
-
None
Problem Description:
set ctrlKeys attribute to ^a, but pressing ctrl+a doesn't sent onCtrlKey event.
Reproducing Step:
<window hflex="1" vflex="1" apply="org.zkoss.zss.essential.EventsComposer"> <spreadsheet id="ss" hflex="1" vflex="1" maxVisibleRows="100" maxVisibleColumns="40" ctrlKeys="^a"/> </window>
public class EventsComposer extends SelectorComposer<Component>{ @Listen("onCtrlKey = spreadsheet") public void onCtrlKey(KeyEvent event){ System.out.println(event.getKeyCode()); } }
Root Cause:
in Spreadsheet.java, below code set ctrlKeys back to default value.
private void reloadUserActionEventRegisteration() { ... String ctrlKeys = ua.getCtrlKeys(); if(ctrlKeys!=null){//null, don't set, keep the original this.setCtrlKeys(ctrlKeys); } ... }