Skip to content

mouse cannot select any text in source editor #13436

Closed

Description

@chrisoswald

System details

RStudio Edition : Desktop
RStudio Version : 
RStudio 2023.06.1+524 "Mountain Hydrangea" Release (547dcf861cac0253a8abb52c135e44e02ba407a1, 2023-07-07) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.06.1+524 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36
    OS Version      : Windows, Linux
    R Version       : R version 4.3.1 (2023-06-16 ucrt)

Steps to reproduce the problem

I cannot find a similar situation. Sometimes it happens, sometimes not. But I can be sure after a time the problems appears.

Describe the problem in detail

Change to Editor and select Text with mouse

nearby ten times a day I cannot select text with the mouse in the source editor. I can click around and position the cursor but not select something. With the keyboard I can work normal. This happens in one editor only, after changing from another editor, in other editors all is working normal. Closing the editor and reopens the file changed nothing. After restart the IDE all is o.k. But every hour restarting rstudio is very annoying. This happens in Linuxmint 21, in the moment rstudio 2023.06.1 Build 524. I have tried it in windows 10 and it's happened also only with less frequency. I have changed the graphics device and this changed nothing. Also changing the theme don't change anything.

Describe the behavior you expected

I can select some portion of code.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on Aug 1, 2023
  2. ronblum commented on Aug 2, 2023

    @ronblum
    Contributor

    @chrisoswald Thank you for raising this! What kind of mouse are you using? I want to make sure that I'm trying this with a similar mouse. Also, since we don't support Linux Mint, I'll test this with Ubuntu and Windows.

  3. added
    info needed
    and removed
    new
    on Aug 2, 2023
  4. chrisoswald commented on Aug 3, 2023

    @chrisoswald
    Author

    I use a Logitech M325 (Bluetooth).
    And I have the same behaviour under a fresh installed Windows 10

    ( Edition Windows 10 Home, Version 22H2, Installiert am ‎20.‎06.‎2023, Betriebssystembuild 19045.3208,
    Leistung Windows Feature Experience Pack 1000.19041.1000.0)

    maybe with less frequency, 4-5 per day

  5. RRTogunov commented on Aug 29, 2023

    @RRTogunov

    I have a very similar issue, along with others. Seemingly at random, text select in some tabs stops working and only solution is restarting the Rstudio application.
    I am using a Dell XPS 15 (2020) trackpad.
    Gif of dysfunctional text select in tabs 2 and 3:
    disfunctional_text_select
    In addition, when this happens, I also lose ability for multi-line and multi-cursor edits, and input shortcuts (eg, for %<% and <- ) appear in the wrong tab. See gifs for other glitches.
    disfunctional_multi_cursor_edit
    disfunctional_multi-line_edit
    disfunctional_shortcuts

    > sessionInfo()
    R version 4.3.0 (2023-04-21 ucrt)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows 11 x64 (build 22621)
    

    Issue persists after full uninstall/reinstall of R and Rstudio (including some older versions)

  6. olivroy commented on Aug 29, 2023

    @olivroy
    Contributor

    I also have that sometimes, I don't understand why it happens.

    I found a quick hack to circumvent this:

    • right click anywhere in RStudio
    • Click Reload.

    This restarts RStudio, but you don't lose your workspace! quicker than restarting session too.

    I have just added this to my .Rprofile in case useful for anyone! Since clicking reload most often loses where you were, calling this function outlines the steps to fix the problem in the session (workaround)

        # Workaround rstudio/rstudio#13605
        unjam_rstudio <- function(save_all = TRUE) {
          if (save_all) {
            rstudioapi::documentSaveAll()
          }
          pos <- rstudioapi::getSourceEditorContext()
    
          # Make sure it isn't a fs path r-lib/cli#683
          path <- as.character(pos$path)
          line_col <- pos$selection[[1]]$range$start
          line <- line_col[["row"]]
          col <- line_col[["column"]]
    
          cli::cli_inform(c(
            "1. Right-click anywhere + click reload",
            "2. Call {.run rstudioapi::documentOpen(path = '{pos$path}', line = {line}, col = {col})} to retrieve your previous location."
          ))
        }

    Therefore, when this happens, you just call unjam_rstudio() in the Console, follow the steps (clicking reload) + click on the cli hyperlink after to retrieve your last known position so you can get everything working faster!

  7. RRTogunov commented on Sep 7, 2023

    @RRTogunov

    Can confirm right-click > Reload worked for me the last time issues came up!
    (RStudio: 2023.06.2 Build 561; R 4.3.1)

  8. ronblum commented on Sep 7, 2023

    @ronblum
    Contributor

    The next time that this happens, can you upload the log files? They might have useful information in them.

  9. github-actions commented on Mar 6, 2024

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

  10. added
    stale
    on Mar 6, 2024
  11. github-actions commented on Mar 20, 2024

    @github-actions

    This issue has been automatically closed due to inactivity.

  12. 11 remaining items

  13. kevinushey commented on Sep 2, 2025

    @kevinushey
    Collaborator

    It might be worth taking an Ace update to see if this helps alleviate the issue users are seeing.

  14. added this to the Apple Blossom milestone on Sep 8, 2025
  15. kevinushey commented on Jan 13, 2026

    @kevinushey
    Collaborator

    We have a speculative fix for this coming to the next daily builds, if anyone is able to test: https://dailies.rstudio.com/

  16. zsspan commented on Feb 3, 2026

    @zsspan

    Just reporting another instance of this happening (Windows 11, rStudio v 2026.01.0). But yes, it appears right click + restart does solve the problem

  17. kevinushey commented on Feb 3, 2026

    @kevinushey
    Collaborator

    @zsspan unfortunately, the speculative fix we made is only in the daily builds; it never became part of the 2026.01 release.

  18. self-assigned this
    on Feb 5, 2026
  19. added and removed
    info needed
    on Feb 10, 2026
  20. ronblum commented on Feb 10, 2026

    @ronblum
    Contributor

    I checked this in RStudio Desktop 2026.04.0-daily+258 on Windows 11 and I didn't see any issues. Unfortunately, I can't verify the issue because I could never reproduce the bug, for example in release 2025.09.1+401. If someone would be willing to try out one of the daily builds for the release currently in development, that would be super! They're located at https://dailies.rstudio.com/.

    Please note that these are for development and testing purposes only, not production work. However, it's possible to run them side-by-side with an existing installation by download a zip file under one of the installer-less builds, unzipping it, and running the RStudio executable inside.

    Also, I'm using a Tecknet Cordless Optimal Mouse BM307.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions