Skip to content

focuspoll: Consider the caret position when focusing editable fields

This allows to have a consistent position upon focus of such fields that have a finer granularity than a plain block.


The idea here is to try and get the same location on focus events that we'd have on caret movements. It's fairly easy to try e.g. in Pluma:

  1. zoom in a fair bit
  2. write some text and move the caret around: you can see that the zoomed area moves around with the caret
  3. switch to another window
  4. switch back. See that the zoomed area is back centered on the caret (you can move the caret to the left and back to see it's indeed the same as caret movements would have given)

CC @sthibaul (just so you can know we got that patch in)

Merge request reports