Steps to reproduce the problem: 1. Select some text inside a textarea in backward/forward direction 2. get selectionDirection property on that textarea via javascript What is the expected behavior? Expected to get value 'backward/forward' What went wrong? Always get 'none' Did this work before? N/A Here's jsFiddle that demonstrates the behavior: http://jsfiddle.net/7Mhqy/1/
<rdar://problem/61070960>
This property only works for keyboard selection (Shift+Right/Left) in WebKit and in Chrome. It does work for mouse selection in Firefox.
(In reply to Bing Wang from comment #0) > Steps to reproduce the problem: > 1. Select some text inside a textarea in backward/forward direction > 2. get selectionDirection property on that textarea via javascript > > What is the expected behavior? > Expected to get value 'backward/forward' > > What went wrong? > Always get 'none' This is expected. On macOS, mouse selection is directionless. The selection extends backwards or forwards depending on user's input, at which point the direction will be determined.