Open Bug 1327244 Opened 8 years ago Updated 2 years ago

Can't access text selection in last selected iframe via keyboard: focusing iframe cancels selection

Categories

(Core :: DOM: Selection, defect)

defect

Tracking

()

People

(Reporter: arni2033, Unassigned)

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url [1]
2. Select text "regressions "
3. Click in urlbar
4. Press Tab key several times until you focus iframe

AR:  Text selection disappears
ER:  Text selection should stay

> [1] data:text/html,world<iframe src="data:text/html,Firefox regressions since version<button>28">


STR_2:  (reference of good behavior)
1. Open url [1]
2. Select text "orl"
3. Click in urlbar
4. Press Tab key several times until you focus the page frame

AR:  Text selection stays, just as expected
Product: Firefox → Core
No longer blocks: 1277113
User Agent:  Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0

I have tested this issue on Windows 10 x64 with the latest Firefox release (50.1.0), the latest Nightly (53.0a1-20170116030326) and also with Firefox (28.0a1,24.0a1,32.0a1 and older builds) and managed to reproduce it following the steps described in the description.
Also I want to mention that I haven't manage to find a good build, therefore, I haven't manage to perform a regression.
Component: Untriaged → Event Handling
Also reproduced on Mac on 50.1.
Selection looks a more appropriate module, per my best guess.
Component: Event Handling → Selection
We also encountered this bug in CKEditor 4, while trying to fix focus issues (https://github.com/ckeditor/ckeditor-dev/issues/1907).

It looks like the selection is removed only if the contents of the iframe are non-editable: https://jsfiddle.net/42jztwrx/ - selecting text in "normal" and "[contenteditable=false]" iframes and then focusing them using keyboard result in removal of selection. However in case of "[contenteditable=true]" one the selection is preserved.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.