Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Can't select text in Extension Manager anymore #9511

Closed
peterflynn opened this issue Oct 10, 2014 · 5 comments
Closed

Can't select text in Extension Manager anymore #9511

peterflynn opened this issue Oct 10, 2014 · 5 comments

Comments

@peterflynn
Copy link
Member

Extension Manager shows an i-beam cursor, but you can't type any text.

This is a regression caused by #9226.

@peterflynn
Copy link
Member Author

Unfortunately, there's no way to prevent focus without also preventing text selection, as far as I know, since preventDefault() on mousedown blocks them both.

So it looks like we'll have to go back to the old tabIndex code, which was removed by #9226 because it was causing #9196. I don't understand why it caused problems though -- in a simple JSFiddle test, tabIndex in no way prevents an unrelated <input> field from gaining focus on click. I couldn't find any mouse listeners in our code that would be blocking this either. Mysterious.

@peterflynn
Copy link
Member Author

Ah, ok -- I think I understand this now. Bootstrap-modal doesn't actually support nested dialogs, but we'd been avoiding problems with its enforceFocus() code because the dialog's root element wasn't focusable (which broke enforceFocus(), happily in this case). Making the dialog focusable brings the buggy Bootstrap beahvior into play, though.

Seems like there are two options:
a) Avoid enforceFocus() bugginess -- either patch over it or stop using bootstrap-modal entirely (it doesn't buy us much at this point anyway). This would fix any other similar bugs that might occur with other nested dialogs, now and in the future.
b) Make Ctrl-Tab work even when document.body has focus, letting us revert to the old setup where the dialog root can't be focused. Easier & less invasive, but other nested dialogs could still get caught by this bug in the future, though.

peterflynn added a commit that referenced this issue Oct 10, 2014
no-focus from dialog root to allow text selection. Change scope of key
listener so tabbing continues to work without needing to reintroduce
tabIndex on the dialog, since that triggers Bootstrap-modal problems (#9196).

Also: add an extra error logging line so that failed updates always log some
error details to the console. (I think this case seemed to come up in a bug
a while back, but couldn't remember which one).
@peterflynn
Copy link
Member Author

I posted the safer "B" fix in PR #9522. Filed a spinoff bug #9524 for the larger Bootstrap cleanup issue.

@peterflynn peterflynn self-assigned this Oct 10, 2014
ingorichter added a commit that referenced this issue Oct 14, 2014
Fix bug #9511 (Can't select text in Extension Manager anymore)
@ingorichter
Copy link
Contributor

@peterflynn I have merged #9522, can we now close this one?

@peterflynn
Copy link
Member Author

Closing as fixed

peterflynn added a commit that referenced this issue Oct 21, 2014
…rouping

* origin/master: (182 commits)
  Fix unit test failure -- file-read wasn't always passing back correct error codes anymore. If the initial stat() fails (e.g. file doesn't exist or permission denied), we were double-converting the error code from brackets-shell format to FS impl API format, causing it to get mangled and treated as "Unknown."
  Limit document file sizes to 16MB on open
  fix definePreference
  auto-install extensions
  Updated .not-editor styling based on @TomMalbran's feedback.
  Added subtle border for dark menus.
  Pushing sidebar icons to the back of Working Files label when they overlap.
  Project dropdown toggle needs right margin.
  Making sure that the anchors in jstree will never show a hover state.
  Fix live dev highlight being out of place in edge cases
  Fix for #9545.
  Made unfocused pane look unfocused.
  Initial commit. Added necessary properties in order to override bootstrap styles. This branch is for #7887.
  Recognize Vagrantfile as ruby
  Replace HTML entity with literal dash in Getting Started
  Update strings.js
  Update strings.js
  Fix bug #9511 (Can't select text in Extension Manager anymore) - Remove no-focus from dialog root to allow text selection. Change scope of key listener so tabbing continues to work without needing to reintroduce tabIndex on the dialog, since that triggers Bootstrap-modal problems (#9196).
  corrected typo in 'bootstrapping'
  Working Performance Set Improvements
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants