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

Editor title input console errors #8293

Closed
kevinansfield opened this issue Apr 7, 2017 · 0 comments
Closed

Editor title input console errors #8293

kevinansfield opened this issue Apr 7, 2017 · 0 comments
Assignees
Labels
affects:editor Work relating to the Koenig Editor

Comments

@kevinansfield
Copy link
Contributor

kevinansfield commented Apr 7, 2017

Issue Summary

Using the keyboard to navigate to/from the editor title raises errors in the console

Steps to Reproduce

  1. Delete everything in the title and keep focus on the input
  2. Press down arrow then up arrow
  3. Console error:
    Uncaught TypeError: Cannot read property 'textContent' of undefined
        at Class.getOffsetAtPosition (gh-editor-title.js:195)
    
  4. Click in title and enter some text
  5. Click down arrow and up arrow to navigate between title and body
  6. Console error(s):
    Uncaught TypeError: Cannot read property 'isBlank' of undefined
        at HTMLDivElement.title.(anonymous function).onkeydown
    

Technical details:

@kevinansfield kevinansfield added the affects:editor Work relating to the Koenig Editor label Apr 7, 2017
disordinary added a commit to disordinary/Ghost-Admin that referenced this issue Apr 7, 2017
When a title is empty it has no textnode children and so we can just return an offset of 0 for the horizontal positioning of the cursor.

Closes: TryGhost/Ghost#8293
disordinary added a commit to disordinary/Ghost-Admin that referenced this issue Apr 7, 2017
When a title is empty it has no textnode to get a length of so we automaticlly put the horizontal offset of the cursor to 0.

CLoses: TryGhost/Ghost#8293
disordinary added a commit to disordinary/Ghost-Admin that referenced this issue Apr 7, 2017
When a title is empty it has no textnode to get a length of so we automaticlly put the horizontal offset of the cursor to 0.

CLoses: TryGhost/Ghost#8293
disordinary added a commit to disordinary/Ghost-Admin that referenced this issue Apr 9, 2017
When a title is empty it has no textnode to get a length of so we automaticlly put the horizontal offset of the cursor to 0.

CLoses: TryGhost/Ghost#8293
kevinansfield pushed a commit to TryGhost/Admin that referenced this issue Apr 10, 2017
closes TryGhost/Ghost#8293
- when a title is empty it has no textnode to get a length of so we automaticlly put the horizontal offset of the cursor to 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:editor Work relating to the Koenig Editor
Projects
None yet
Development

No branches or pull requests

2 participants