Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Pressing the space bar while inside any TextEditor scrolls the window down #767

Closed
BinaryMuse opened this issue Apr 15, 2016 · 38 comments
Closed
Labels

Comments

@BinaryMuse
Copy link

Pressing the space bar with the focus inside any settings-view TextEditor (to insert a space character) scrolls the window.

spaces-pls

@winstliu winstliu added the bug label Apr 15, 2016
@JSn1nj4
Copy link

JSn1nj4 commented Apr 26, 2016

What OS are you on, and what Atom version?

@BinaryMuse
Copy link
Author

BinaryMuse commented Apr 27, 2016

I'm on the latest master (1.9.0-dev-c4d4e0f), settings-view 0.235.1, OS X 10.11.4.

@lee-dohm
Copy link
Contributor

I could reproduce this on the Install tab, but not the Packages tab using Atom v1.9.0-dev-c4d4e0f on Mac OS X 10.11.4.

@jerone
Copy link
Contributor

jerone commented Apr 28, 2016

Reproducible on every tab (Settings, Keybindings, Packages, Themes & Install) on Windows 7 with Atom 1.8.0-beta2 and 1.8.0-beta3.

@NFiorentini
Copy link

Reproduced on every tab using Atom v1.8.0-beta4 on Windows 10.0.10586 Build 10586.

@muendelezaji
Copy link

Any updates on this?
Still happening on Atom 1.8.0 release, OS X 10.11.5. All tabs - Settings, Keybindings, Packages, Themes & Install

@leshniak
Copy link

leshniak commented Jun 14, 2016

I made a workaround in my init.coffee, unfortunately works only partially (only on Settings panel or if you open all settings panels and then reopen settings tab). Maybe someone knows how to bind it better [link deprecated]

@leshniak
Copy link

leshniak commented Jun 15, 2016

Ok, new version of my workaround works good. Put it in the init.coffee and enjoy.

@claudiofantacci
Copy link

@leshniak 's workaround works smoothly. Thanks!

Looking forward for a mainstream bugfix as well.

@muendelezaji
Copy link

Works for me too. Thanks @leshniak

@leshniak
Copy link

I think it should be fixed on atom-text-editor level, but maybe I'm wrong, I don't know Atom and Electron too much.

Btw, I made newer version of my workaround, w/o jQuery, it works with every atom-text-editor[mini] component. Link to gist in my previous comment.

@claudiofantacci
Copy link

@leshniak I opened an issue about this problem on atom and it was closed with the "wrong repo" label and redirected here. Thus I assume it's the correct one.

@NFiorentini
Copy link

Thank you, @leshniak!

@jerone
Copy link
Contributor

jerone commented Jun 16, 2016

I did some testing and I can reproduce this issue from at least 13 Sep 2015 7b60bb5 (anything earlier gives errors for now).

@jerone
Copy link
Contributor

jerone commented Jun 16, 2016

Identified the problem by removing the textInput event (in the Dev Tools) attached on the TextEditorComponent.

@claudiofantacci
Copy link

Ok, then we might want to wait for a bugfix release and after that remove @leshniak workaround.

@ricefai
Copy link

ricefai commented Jun 18, 2016

Works for me, thanks

@bastilian
Copy link
Contributor

Anyone working on this? Otherwise i would take a look at it.

@bastilian
Copy link
Contributor

So, I've been looking into this, I believe the best way to address this would be to prevent this behaviour in the mini mode by using the setMini function of TextEditor and add an event listener that handles the spacebar event, simply ignoring it and stop it from bubbling up and cause the the default chrome behaviour and scroll.

BUT this may just be a workaround and not the root of the problem, as I have yet to find out why this behaviour is not occur in places like find-and-replace, where TextEditor is used in mini as well.

My two theories are that it doesn't do it because it is observing changes with a handler that prevents this already or it does occur, but halts and is not effective since the view the TextEditor is in is not scrollable.

When I have found out why this doesn't happen in find-or-replace, I would open a issue on atom/atom proposing the change and discuss it further there.

@DamnedScholar
Copy link

I have yet to find out why this behaviour is not occur in places like find-and-replace, where TextEditor is used in mini as well.

You've made it so that find-and-replace scrolls in order to test this?

@bastilian
Copy link
Contributor

@DamnedScholar no, that should read "...this behaviour does not occur..." :) and that is what I still need to figure out.

@ShadowLNC
Copy link

ShadowLNC commented Jun 29, 2016

Reproducible on 1.8.0 release, Win10 64-bit, all tabs (except Updates which has no text input).

In regards to find-and-replace, it usually either focuses the file TextEditor or one of the TextEditors (mini) inside the find-and-replace dialog, but on the occasions that I get all cursors to disappear, spacebar will refocus the file TextEditor and insert the space there (suggesting the file TextEditor was actually focused without a cursor).

Clicking on empty space in the tab bar will also unfocus the cursor, but the spacebar then has no effect (suggesting the file TextEditor is properly unfocused this time).

Spacebar in tile-view also scrolls, though that may be intended behaviour (and it's not this package, but it's worth noting the behaviour).

@bastilian
Copy link
Contributor

I had to modify the style of the elements a bit to make it happen, but as I suspected this behaviour happens not only in settings-view:
find-replace

I'll investigate this more what triggers the behaviour, how it can be fixed and open an issue on atom/atom. I'm not really happy with the solution I proposed above, since I have the feeling there is a tiny bit more behind it.

@andrewstart
Copy link

For your coming issue on atom: I've been seeing this problem in the custom editors that I am working on. When any atom-text-editor (mini or not) is contained within a scrollable section of the page, then spacebar causes that section to scroll.

@philxchen
Copy link

philxchen commented Jul 8, 2016

Reproduced.

Windows 10 build 14366 ~ 14388
Atom 1.9.0-beta0

However, only the first Space triggers the problem, while following ones work properly.

@danielbayley
Copy link

😞
I'm also getting this on:

Atom 1.8.0
OS X 10.11.6
settings-view 0.235.1

@ghost
Copy link

ghost commented Jul 25, 2016

Also happens on ubuntu 16.04

Atom    : 1.8.0
Electron: 0.36.8
Chrome  : 47.0.2526.110
Node    : 5.1.1

@andyrichardson
Copy link

Just encountered this on Fedora 24

@damieng
Copy link
Contributor

damieng commented Jul 27, 2016

I don't think we need any more messages about it happening. It happens everywhere on all systems.

@nathansobo
Copy link
Contributor

This just came to my attention and is a really bad regression. My apologies to everyone affected. A fix will be out with the next release (shortly).

@sharifzadesina
Copy link

sharifzadesina commented Jul 29, 2016

Still exists.

ubuntu 16.04
atom 1.8

@brainscript
Copy link

Same here. 😞

eOS Freya (Ubuntu 14.04)
Atom 1.8.0

@jerone
Copy link
Contributor

jerone commented Jul 29, 2016

I can confirm this being fixed for Windows with Atom 1.9.0-beta2.

@mnquintana
Copy link
Contributor

This has been fixed for the next release of Atom, which isn't out yet. If you want to get the fix sooner, you might be interested in the Beta channel.

@Kaukov
Copy link

Kaukov commented Aug 2, 2016

I can confirm this has been fixed in 1.9.0

Tested on Windows 10 Pro x64 & ElementaryOS Loki Beta 2 (Ubuntu 16.04)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests