Open Bug 1699087 Opened 3 years ago Updated 7 months ago

Selection.modify() with sentence granularity don't work, exception: NS_ERROR_NOT_IMPLEMENTED

Categories

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

Firefox 86
Desktop
All
defect

Tracking

()

UNCONFIRMED

People

(Reporter: oskar.poprawski, Unassigned)

Details

(Keywords: parity-chrome)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

Example from this page: https://developer.mozilla.org/en-US/docs/Web/API/Selection/modify

###Example use which is not working:
let selection = window.getSelection();
selection.modify('extend', 'forward', 'sentence');

###Example use which works well:
let selection = window.getSelection();
selection.modify('extend', 'forward', 'word');

On mobile Firefox and other browsers both methods are working properly.

Actual results:

There is exception in console:

name: "NS_ERROR_NOT_IMPLEMENTED"
result: 2147500033

Expected results:

Selecting sentence with selecting API.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Component: Widget: Cocoa → General
OS: Unspecified → All
Product: Core → Firefox
Hardware: Unspecified → Desktop
Component: General → DOM: Selection
Product: Firefox → Core

Per note in MDN,

Gecko does not implement "sentence", "paragraph", "sentenceboundary", "paragraphboundary", or "documentboundary"

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