ContentEditable + slot : Making selection (with mouse) blocked between table rows
Reported by
sylvain....@gmail.com,
Aug 3
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.23 Safari/537.36 Steps to reproduce the problem: 1. Open the test file in chrome 68 2. Select text with your mouse throw cells and rows -> you can select all text (in the 3 table rows). 3. Open the test file in chrome 69 4. Select text with your mouse throw cells and rows... What is the expected behavior? Same as Chrome68 : you should be able to select all the text. What went wrong? Your selection is limited to only one row in the table. Did this work before? Yes 68.0.3440.84 (Build officiel) (64 bits) Does this work in other browsers? N/A Chrome version: 69.0.3497.23 Channel: beta OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: The issue is raised when you are in contentEditable=true and when the table element is in a shadow tree.
,
Aug 6
Able to reproduce issue on reported chrome version 69.0.3497.23 & on latest chrome 70.0.3513.0 using Windows 10, Mac 10.13.5 and Ubuntu 17.10. Hence providing bisect information below. Bisect Info: ================ Good build: 69.0.3495.0 Bad build: 69.0.3496.0 CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/6e7487848976f30a8bd3a216e89dafaea48bd979..7bd29404a6ab8d36bdff4123ae522fcd9068344b suspect: https://chromium.googlesource.com/chromium/src/+/7bd29404a6ab8d36bdff4123ae522fcd9068344b Reviewed-on: https://chromium-review.googlesource.com/1102157 @ctzsm: Please confirm the issue and help in re-assigning if it is not related to your change. Adding 'ReleaseBlock-Stable' label for M-69. Please feel free to remove if this is not applicable. Thanks!
,
Aug 6
,
Aug 6
sylvain.spinelli@ Thanks for reporting this bug! But this works as intended. You need to add |table.contentEditable = "true";| in connectedCallback() if you still need this behavior. The previous behavior is not correct, because from the shadow DOM spec [1]: "The value of the contenteditable attribute must not propagate from shadow host to its shadow trees." However, the spec didn't say too much on scattered elements (the <slot>). Since the custom table is defined outside of shadow DOM, they are still editable, but since <table> and <slot> are not editable, these elements form isolated editing blocks. Then you can't select all three lines. [1] https://w3c.github.io/webcomponents/spec/shadow/#editing
,
Aug 6
Many thanks @ctzsm for your explanations. It works fine with `table.contentEditable = "true"`. FYI, I use this customElement table "wrapper" in order to overlay widgets for table edition (cells selector, insert/delete/resize/span cols and rows, etc.) |
||||
►
Sign in to add a comment |
||||
Comment 1 by vamshi.kommuri@chromium.org
, Aug 6