Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

prevent sync modal from forcing focus when switching inputs #12783

Merged
merged 1 commit into from
Feb 12, 2018

Conversation

cezaraugusto
Copy link
Contributor

@cezaraugusto cezaraugusto commented Jan 22, 2018

fix #11653

Test Plan:

  1. Go to sync panel
  2. Open "I have an existing Sync code"
  3. Autofocus should be in the passphrase textarea
  4. Clicking on "Enter an optional name for this device" should focus correctly
  5. close modal, go to "I am new to Sync"
  6. Input should have autofocus as well

@cezaraugusto cezaraugusto added this to the 0.21.x (Developer Channel) milestone Jan 22, 2018
@cezaraugusto cezaraugusto self-assigned this Jan 22, 2018
@cezaraugusto cezaraugusto changed the title prevent sync modal to force focus when switching inputs prevent sync modal from forcing focus when switching inputs Jan 22, 2018
@cezaraugusto
Copy link
Contributor Author

fyi issue happens because input for device name is reused in both modals causing autoFocus to conflict.

Also removed React lifecycle in favor of HTML to avoid wasting update calls.

@codecov-io
Copy link

codecov-io commented Jan 23, 2018

Codecov Report

Merging #12783 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master   #12783      +/-   ##
==========================================
+ Coverage   56.09%    56.1%   +<.01%     
==========================================
  Files         279      279              
  Lines       27307    27303       -4     
  Branches     4443     4442       -1     
==========================================
  Hits        15318    15318              
+ Misses      11989    11985       -4
Flag Coverage Δ
#unittest 56.1% <0%> (ø) ⬆️
Impacted Files Coverage Δ
app/renderer/components/preferences/syncTab.js 17.36% <0%> (+0.35%) ⬆️

Copy link
Member

@diracdeltas diracdeltas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test plan works!

@cezaraugusto
Copy link
Contributor Author

Thanks!

@cezaraugusto cezaraugusto merged commit ef5a356 into master Feb 12, 2018
@cezaraugusto cezaraugusto deleted the sync/input-autofocus branch February 12, 2018 22:37
@bsclifton bsclifton modified the milestones: 0.22.x (Developer Channel), 0.23.x (Nightly Channel) Feb 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

when syncing a new device, unable to click in field to give device an optional name
4 participants