-
Bug
-
Resolution: Won't Fix
-
Normal
-
None
-
8.6.2
-
Security Level: Jimmy
-
ZK 9.0.1 S1
-
None
Steps to Reproduce
<zk> <listbox> <listitem><listcell label="Some text to copy"/><listcell label="Some text to copy"/><listcell label="Some text to copy"/></listitem> <listitem><listcell label="Some text to copy"/><listcell label="Some text to copy"/><listcell label="Some text to copy"/></listitem> <listitem><listcell label="Some text to copy"/><listcell label="Some text to copy"/><listcell label="Some text to copy"/></listitem> </listbox> </zk>
- Select/highlight text using the mouse.
- select text within a single row OR
- select text over multiple rows
- Press Ctrl-C to copy the highlighted text to clipboard.
Current Result
varying browser behavior
Chrome:
- single row: when holding CTRL the selection disappears (when releasing CTRL the selection is restored) -> making it impossible to complete CTRL-C to copy
- multiple rows: works in Chrome
FireFox:
- the selection is immediately removed after releasing the mouse
Expected Result
allow copying of text contents in a listbox
consistent browser behavior
Debug Information
https://github.com/zkoss/zk/blob/v8.6.2/zul/src/archive/web/js/zul/sel/SelectWidget.js#L606-L652
The code clearly disables selection on keydown event, without giving a reason in the comments.
Workaround
for chrome (ignore control/meta/alt key in the keydown method):
http://zkfiddle.org/sample/3a2ddud/2-user-select-none-alt-tab
all browsers:
using <listbox nonselectableTabs="*"/> doesn't interfere with copy/paste any more
- relates to
-
ZK-2433 Highlight text in a listitem without using nonselectableTag
-
- Closed
-