Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ctrl-c shortcut that overlaps windows copy functionality #16

Closed
wants to merge 1 commit into from

Conversation

Jeddf
Copy link
Member

@Jeddf Jeddf commented Jan 4, 2018

resolve #14

@Jeddf Jeddf requested review from wesleytodd and nicorobo January 4, 2018 20:06
@wesleytodd
Copy link
Contributor

wesleytodd commented Jan 4, 2018

After looking at this, it would be super trivial to keep the feature but turn it off based on a prop or environment detection. I think it is overkill to remove it for all users when it is a better experience to implement what platform specific users would expect.

@Jeddf
Copy link
Member Author

Jeddf commented Jan 4, 2018

What environment specifically would you say the current shortcuts target? I could add a flag like 'shortcutSet' that has environments enumerated that defaults to none and has just has one available option at first?

@wesleytodd
Copy link
Contributor

The current shortcuts target OSx and a bit of *nix (dont think many people will care about *nix though). TBH I think it is reasonable for hermes to just make a decision about its defaults but have the "dumb" underlying components be un-opinionated. So like have that file turn ctrl-c to a noop in windows, and esc into a noop on osx/*nix.

@Jeddf
Copy link
Member Author

Jeddf commented Jan 18, 2018

Looked around for libraries that could do that OS detection and this seemed like the most likely candidate: https://github.com/bestiejs/platform.js/. Seems kinda heavy though and I'm not sure I agree with the idea that an autocomplete box should be worrying about platform distinct keyboard shortcuts anyway.

As far as StreamMe goes we wanted to ship and weren't looking to have keyboard shortcuts but I want to respect this library being OSS and having it's own community. Taking a hard turn in terms of direction just because StreamMe wants to do something ain't right and isn't really necessary. We've forked internally for now, with no keyboard shortcut overrides and using input/textarea instead of the contenteditable.

I'd spent about a week grinding away at little edge cases around nbsp and text selection and the inconsistencies in behaviour between browsers. Will hopefully come back soonish and bring the fruits of that work to the open source portion here. Using contenteditable in the long run would obviously be preferable as it allows all the good stuff with styling the content as HTML.

@Jeddf
Copy link
Member Author

Jeddf commented Jan 18, 2018

Also! I realize I'd closed a previous unmerged but approved PR from you @wesleytodd, sorry about that, I'd fully intended to have those changes folded in with my work but you had a line where you subbed in nbsp's for all spaces and that caused the words to not wrap properly. That week I mentioned above working on nbsp and contenteditable did not end with anything I was happy offering up, hence this being a little anti-climactic.

@wesleytodd
Copy link
Contributor

I mean if the library doesn't serve the needs than it isn't good. So make the necessary changes. My comments were more to make sure they were not being short-sighted for expediency sake. In this case, I fully agree that adding that lib is WAY overkill. Killing the ctrl-c binding seems like the right solution in that regard.

That being said, forking internally also seems like a bad idea. The whole point of publishing this was that we could have external users or bot authors, at some point, using the same code in use on the channel page. So a fork doesn't even solve that.

@wesleytodd
Copy link
Contributor

with no keyboard shortcut overrides and using input/textarea instead of the contenteditable.

So you dropped the highlighting? I am pretty confused because there were very few known issues with the implementation here other than that spaces one you posted about, for which I think the fix was really simple. Maybe post more issues and see if I can give any other direction?

@Jeddf
Copy link
Member Author

Jeddf commented Jan 18, 2018

Yeh absolutely, there were issues around selecting and pasting text also, I'll get 'em into issues here soon.

@Jeddf Jeddf closed this Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default ctrl shortcut overlaps key system shortcut
3 participants