bcgov / bcgov/wps

Morecast V2: Workaround datagrid spacebar bug

Open
#2,697 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Python
Stars
65
Forks
11
Avg merge
1d 2h
Merged PRs (30d)
70

Description

**Actual Behaviour**

There are a couple of strange behaviours with the datagrid that we might want to try and workaround.

1. Launch Morecast 2: https://psu.nrs.gov.bc.ca/morecast-2
2. Scroll down the grid and find an N/A value.
3. Position the row with the N/A value as the last visible row
4. Single click on the N/A cell
5. Press the spacebar. You will see the datagrid scroll which it shouldn't
6. Press Enter to end the edit session. You will see a value of 0 in the cell, it should remain as N/A if nothing was typed in.

![image.png](https://images.zenhubusercontent.com/6375312161f086155789c147/8f3f2c62-1e6d-4999-8fed-a0f1bcd82639)

We could try intercepting the space bar keystroke event and swallow it.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Morecast 2 at https://psu.nrs.gov.bc.ca/morecast-2 using the listed datagrid steps, then locate the datagrid implementation and its keyboard handling. Confirm the spacebar no longer scrolls the grid and that pressing Enter without typing leaves an N/A cell unchanged.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.