intellij-file-preview icon indicating copy to clipboard operation
intellij-file-preview copied to clipboard

Focus shifts to Project view while editing scala file

Open BananaPlantain opened this issue 4 years ago • 4 comments

Happens right after starting to create a new top level class/object to an existing Scala file.

BananaPlantain avatar Jul 23 '20 23:07 BananaPlantain

@BananaPlantain Thanks for reporting!

Unfortunately I am not familiar in development with Scala. Can you please provide some more details (e.g. used IDE & version, used (Scala) Plugin, Scala SDK setup, detailed steps on how to create "a new top level class/object to an existing Scala file, ...). Thanks!

SeeSharpSoft avatar Aug 08 '20 12:08 SeeSharpSoft

This happens to me also, when adding a new Kotlin class (as soon as I start to type, focus is shifted to the project view and my keystrokes start searching for files)

Xapphire13 avatar Sep 01 '20 21:09 Xapphire13

I experience this when adding javadoc comments, but it's always been inconsistent. I'll type /* and focus will jump to the Project view before I can type the last *.

I think I've just found a way to replicate it...

Using IntelliJ IDEA 2020.1 & Quick File Preview 1.6.2

  1. Open two editor window tabs fully (not previews), where one is a Java class without class-level javadoc
  2. Switch to the other tab, then back to the Java class, using the mouse to click on the tab
  3. On the line above the class declaration, type /*
  4. Focus will switch to the Project view

During this I discovered that it only happens when 'Always Select Opened File' is selected. I note that the readme says this option is incompatible (under the previous name 'Autoscroll To Source') - I swear it used to only warn against using 'Open Files With A Single Click'... It'd be awesome if this could be supported, I think the two features (autoscroll and quick preview) fit well together conceptually. That said Intellij IDEA 2020.3 appears to finally include its own preview feature

FrankyGee avatar Dec 15 '20 03:12 FrankyGee

Similar issue: On creating a new Scala file with Alt + Insert -> Scala Class -> Object, it jumps to "Search for: " in the project sidebar.

Steps to reproduce (Intellij IDEA 2020.3.1 and .3.2):

  1. Create a new Scala project with default settings
  2. Navigate to src/main/scala and create some package
  3. Highlight the package and press Alt + Insert, press Down Arrow for "Scala Class", press Enter
  4. Type a name, for example Object and press Down Arrow twice, press Enter.
  5. Double click on the object name to select the word, type a different class name, for example Puppies

The bug has now ocurred. Instead of typing Puppies to replace the object name, you most likely have typed P or Pu in the editor window and uppies or ppies in the top left of the project sidebar in a "Search for: uppies" dialogue.

JoshCode avatar Feb 10 '21 16:02 JoshCode