directorlive / oppia

Automatically exported from code.google.com/p/oppia
Apache License 2.0
0 stars 0 forks source link

Use rangy library to save cursor position before opening a modal, restore focus back to saved position after exiting modal #770

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Branch name:
textangular-save-cursor

Link to the relevant commit(s):
https://code.google.com/p/oppia/source/detail?r=74c1d62ba43b73ae1e295bec1bafaa27
b916df6a&name=textangular-save-cursor

Purpose of code changes on this branch:
Restore focus to text-editor after opening/closing a modal, so buttons do not 
get grayed out each time.

When reviewing my code changes, please focus on:
There may be cases where cursor position is not saved properly, or widgets get 
inserted into the wrong place?

After the review, I'll merge this branch into: develop

Original issue reported on code.google.com by AYZh...@gmail.com on 21 May 2015 at 5:18

GoogleCodeExporter commented 9 years ago
Note: I've noticed that selecting a chunk of text and then clicking a widget 
button will delete the selected chunk of text, though it also happens on the 
develop version of the editor (before this commit) so it is probably separate 
from these changes.

Original comment by AYZh...@gmail.com on 21 May 2015 at 5:22

GoogleCodeExporter commented 9 years ago
Yep, I saw that, I think it is separate too (and probably reasonable, in the 
sense that typing would also delete that chunk of text).

Amy, FYI, this refers to your comment at the end of issue 475 about focus not 
returning to the rich-text editor after an extension is selected:

    https://code.google.com/p/oppia/issues/detail?id=475

Could you take a look at this branch and see if you're happy with the current 
behavior? Thanks!

Original comment by s...@seanlip.org on 21 May 2015 at 5:28

GoogleCodeExporter commented 9 years ago

Original comment by AYZh...@gmail.com on 25 May 2015 at 7:55