Open Bug 1593004 Opened 6 years ago Updated 3 years ago

Track-pad click fails to initiate selectstart

Categories

(Core :: DOM: Selection, defect, P2)

71 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: gary_harper, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file AnotherTest.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15

Steps to reproduce:

I am delighted you fixed the disappearing caret, but I just discovered another FireFox eccentricity: a track-pad tap-click won't initiate selectstart. This precludes the newly popular tap-and-slide selection that has overtaken most notebook computers.

Click-select-starting is crucial to my new <p>-flowing <div>-box-nested language; which, to enforce syntactic structure, only permits editing one word at a time in an editNode that typically proceeds at the downstream end of a flow.

To transfer the editNode to other words requires, for structural integrity, selecting whole words at a time and then .prevent-default-ing the selectstart. This is done in the attached grabSelectStart() function. It grabs, selects, and prevents default in Safari, Chrome, Edge; but not in FireFox. Give it a try.

Also, those browsers all three provide tap-and-slide selection; but not FireFox. You can explore that by un-commenting the //return;

I am not complaining; I am just kindly informing you about an odd-one-out behavior you might like to know about.

Gary

Component: Untriaged → Editor
Product: Firefox → Core
Component: Editor → Selection

Gary, thanks for reporting the issue. Is it possible to reduce the testcase to a simpler one, requiring less context? The provided one is hard to understand, not knowing the context of your project.

Flags: needinfo?(gary_harper)
Attached file Another Test.html

The addendum file says it all

Flags: needinfo?(gary_harper)

Thanks for adding the simplified file.

After a brief analysis without trackpad, it turned out Firefox doesn't fire a "selectstart" event when the range is collapsed. It only fires a "selectionchange" event.

Severity: normal normal → S3 S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: