Skip to content
This repository was archived by the owner on Sep 4, 2019. It is now read-only.
This repository was archived by the owner on Sep 4, 2019. It is now read-only.

Focus Based Navigation Improvements #49

@tneil

Description

@tneil

Background

Currently the focus based navigation mode is entirely written in Java. The overall goal of the focus based navigation (known as navMode) is to provide highlight navigation of items via the trackpad for both non-touch and touch based devices.

With the new architecture of the BB6+ devices that use a native WebKit instance, this causes severe performance degradation. On BB6+ devices you see lots of "echoing" when scrolling where the scroll movements will be "re-played".

This is a result of the IPC channel between Java and Native when interacting with the DOM of the page in the browser. All DOM calculations and event raising currently happens in Java which turns into synchronous IPC calls to the Native WebKit browser. This IPC channel creates a delay thus causing the echo.

Goal

We want to move this logic from Java down into JavaScript where it performs much better. The only touch points with Java should be events that are raised from the Trackpad down into asynchronous "scroll" events in the JavaScript thread. All touch points with the DOM need to be in JavaScript.

All functionality of navMode is intended to be kept except for those items explicitly called out in the "Limitations" section.

Limitations

The implementation in Java has a unique ability to raise "pseudo classes" in CSS by triggering the CSS hover for a DOM element. When moving the logic to JavaScript this functionality will be lost.

All styling of DOM elements to indicate that they are focused/unfocused must be done through style changes triggered by mouseover and mouseout events on the DOM element.

This is somewhat less convenient than using :hover pseudo classes because of their simplicity and cascading nature.

This also means that the default hover CSS effect (draw blue outline around DOM element) will also not be supported in the re-write

On BB5 CSS hover event perform better than mouse events through JavaScript. To attain the desired performance on BB6+ devices, some performance on BB5 will be sacrificed.

Challenges

There may be some occasions where we are not able to trigger certain events from JavaScript to produce the desired result.

One such example would be clicking on a <select> box and having it pop open for the user to interact with. This may need to be handled by actually trapping this click and providing a UI for the user to then select the item. Same goes for other UI controls such as date edits.

This will all be uncovered as we do the work and work through the issues with their possible solutions.

Stretch Goals

There were some aspects of navMode that were not possible with the Java implementation. One of these was the ability to handle scrollable div's and scroll content within the div. We are hopeful that we can also tackle this as a stretch goal for the improvements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions