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

Keyboard events don't include all properties in onSelection event #280

Open
jpsorensen-asimov opened this issue Jan 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jpsorensen-asimov
Copy link

Describe the bug

When making a selection via the mouse, onSelection is called with a selection object like the following:

{
    "clockwise": true,
    "end": 16,
    "length": 7,
    "name": "",
    "ref": null,
    "start": 9,
    "type": "SEQ"
}

However, when making the same selection using the keyboard (setting the cursor at the start position and then shift+arrow to get to the end), we get an object like the following:

{
    "clockwise": true,
    "end": 16,
    "start": 9,
    "type": "SEQ"
}

Although most of the missing values (name, ref) are nonsense / empty values, length is an actual value that's present on mouse events but not keyboard events.

length is an optional field, so in some sense this isn't a bug (a client should be prepared to handle an empty length) but I suspect this is accidental and not intentional - is that correct?

Thanks!

Expected behavior

Same / similar selection object regardless of whether the selection was performed via mouse or keyboard.

Screenshots

Your environment:

  • OS: OS: Mac OS 15.1.1 (24B91)
  • Browser Chrome
@jpsorensen-asimov jpsorensen-asimov added the bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant