apache / apache/royale-asjs

preventDefault() not working on DragEvent

Open
#629 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
ActionScript
Stars
380
Forks
120
PR merge metrics
No merged PRs in 30d

Description

Getting a runtime error:
TypeError: Cannot read property 'preventDefault' of null (null is the event object)

This could be because

COMPILE::JS
public class DragEventBase extends goog.events.BrowserEvent

While the controller creates the event and dispatches it on a Royale element. In other words there's no related browser event that's kept in reference.

@aharui ,
Is there a reason DragEventBase does not extends org.apache.royale.events.Event ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with DragEventBase and its COMPILE::JS declaration, then trace the controller path that creates and dispatches the event on a Royale element. Reproduce the preventDefault() failure and inspect how the event object is retained; done means DragEvent preventDefault() no longer encounters a null event reference.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.