Skip to content

Navigating to an anchor, focus, and caret navigation insertion point ordering. #7759

Open
@emilio

Description

@emilio

Somewhat related to #7657.

I'm implementing https://bugzilla.mozilla.org/show_bug.cgi?id=277178 and something that came up during the review was the ordering of steps with regards of "sequential focus navigation start point" and the focus move.

So: "sequential focus navigation start point" in Gecko is just the selection anchor point. This has been long-standing behavior and it seems to me it works quite nicely (the anchor point moves with the mouse when the user clicks on stuff, etc...).

Gecko historically first moves the selection anchor, then clears focus on the window, which is the opposite order to https://html.spec.whatwg.org/#scroll-to-the-fragment-identifier. It seems likely for a focus event listener to modify the selection, so moving selection afterwards seems unfortunate.

So, questions:

  • Should really the "Move the sequential focus navigation starting point to target." step be after "Run the focusing steps for target, with the Document's viewport as the fallback target."? Seems potentially undesired regardless of the following question as per above.

  • Should really the "sequential focus navigation start point" be a different concept from selection?

For now, I think I'm going to keep the pre-existing order (move selection, then focus change), given this area is not particularly interoperable.

cc @smaug---- @annevk

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions