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

Ensure paragraph is selected for firefox. #1455 #1495

Merged
merged 1 commit into from
Jun 2, 2019

Conversation

peterchappell
Copy link
Contributor

Also ensure that we select the parent is selected if ever a br tag is the selected element when typing.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
New tests added? no
Fixed tickets #1455
License MIT

Description

I noticed in the handleKeyup method that sometimes the selected node was a BR tag. When this is the case, typing does nothing. The use case in the issue (which was a problem for me also) is when you press enter from a new heading - so I've added a fix for that scenario (wrapped in the isFF util). I also added a fallback check - since I've seen other random places where typing seems to get "trapped".

Very happy to work with you if you have suggestions for improvement - as I'm not fully immersed in the library (or in contentEditable in general).

--

Please, don't submit /dist files with your PR!

parent if ever a br tag is the selected element when typing. yabwe#1455
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 93.93% when pulling f89381c on peterchappell:fix-firefox-newline-after-headings into 9156a11 on yabwe:master.

@rdeprey rdeprey merged commit faddb6a into yabwe:master Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants