selectall / unselect regressions in 3.5.0, 3.6
See original GitHub issueSome regressions were introduced in 3.5 in type()
behavior when interacting with selection (selectall / unselect).
Current behavior:
The issue happens in a rich text editor where we are making a text bold by triggering:
{selectall}
to select the typed text{ctrl}B
one time to start- unselecting by triggering {rightarrow}.
{ctrl}B
a second time to stop
It seems:
- the content is not unselected by triggering
{rightarrow}
. - the
{ctrl}
is ignored, onlyB
is triggered
Steps to reproduce: (app code and test code)
In a rich text editor supporting this command.
- Type:
Hello{selectall}{ctrl}B{rightarrow}{ctrl}B world!
- Desired behavior < 3.5: Hello World !
- Current behavior >= 3.5: B World!
Work in progress, currently trying to generate a minimum reproduction.
Sources
- Upstream issue: https://github.com/opencollective/opencollective-frontend/pull/2943
- Cypress Test: https://github.com/opencollective/opencollective-frontend/blob/master/test/cypress/integration/15-tier-page.js#L35
- Sample CI Run: https://circleci.com/gh/opencollective/opencollective-frontend/55483
Versions
Introduced in Cypress 3.5, still happening in 3.6. Linux / Mac OS.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
37606 – EDITING, TABLES: Edit > Select All doesn't work on a ...
Type Ctrl+A (or on the menu: Edit > Select All) and it will only select the table (first the cell, and then the...
Read more >Changelog - Cypress Documentation
We fixed a regression in 3.5.0 where Cypress would crash on Windows when trying to pass a url through --config or --env command...
Read more >Versions - MulgaSoft
Version 3.6.5: Add eval-expression (M-:) to set/show certain internal variables dynamically; If the internal variable `kill-whole-line' is non-`nil', ...
Read more >Maven error "Failure to transfer..." - eclipse - Stack Overflow
Remove all your failed downloads: find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;. For...
Read more >JupyterLab Changelog — JupyterLab 3.6.0b0 documentation
Bugs fixed¶ · Set isUntitled to false on document path changes #13268 (@fcollonval) · Remove some unused CSS styles and fix icon alignment...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Betree so in
3.4.1
if you have two of the same modifiers in a key string, we simply ignore the second one, since we treat it as still being held down. In3.5.0+
we send a second keydown, which is causing the bug. If you remove the secondctrl
from your type string, it should fix the issue. I’ll open another PR to fix this and revert to ❤️.5.0 behavior, but this does show how our .type API is confusing for users. (notice in the 3.4.1 screenshot how thectrl
modifier is held down after the first press, and there is no secondctrl
keydown)We should probably implement a way to type one modifier key combination + release without having to break up into multiple type commands, something like:
cy.type('{ctrl+b}hello{ctrl+b}world')
Hi @Bkucera, I’m working with @znarf on Open Collective.
We don’t
preventDefault
in our code, but the library we’re using - react-quill - may.Here’s a screenshot of the logs in console:
I’ve been able to make it work on 3.6.1 by splitting in multiple
cy.type
: