Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searchbox should support copy/paste #506

Closed
pq opened this issue Nov 17, 2011 · 3 comments
Closed

Searchbox should support copy/paste #506

pq opened this issue Nov 17, 2011 · 3 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@pq
Copy link
Member

pq commented Nov 17, 2011

ssia.

@pq
Copy link
Member Author

pq commented Dec 2, 2011

I looked at this today and noticed this weirdness: if the currently selected workbench part (before initiating a search) is an editor the the paste gets ignored by the searchbox and instead gets pushed into the editor. On the other hand, if the currently selected part is the library explorer the paste goes to the searchbox, proper and expected.

The plot thickens...


cc @devoncarew.

@pq
Copy link
Member Author

pq commented Dec 12, 2011

The root of this issue is how the workbench handles "global" commands (and bindings) such as copy/paste. The rub is that the active part gets first whack at handling a dispatch (chain of command style) before the focus control. This is not good because the editor (and other views) have their own idea(s) of how to handle copy/paste and so the searchbox never gets a chance. To play nice with the workbench the searchbox would need to act more like a workbench part and be a first class participant in the command-handling story. Unfortunately, the workbench model is not flexible re: part implementatiosn and there's no good story for parts that are neither views or editors. "Faking it" might be possible but doing so necessitates a sprawling, complex and surprising solution. To boot, I'm not 100% convinced it would even work. Especially if we stray to Eclipse 4* where the workbench model has gotten a pretty major re-think. (FWIW: if anyone wants to explore this further, chime in, have at and we can revisit!)

So, where does that leave us?

The good news is there's a pretty simple errrr hack that will get us the UX we want. The trick is to notice focus changes and disconnect the global binding service when the searchbox has key focus, careful to re-connect when focus goes away.

I've got this implemented and have been banging on it a fair a bit and haven't experienced any hiccups. I'll put out a CL soon for popular consumption and we can go from there. Net-net: I don't love the solution, but I dislike it less than the alternatives...

@pq
Copy link
Member Author

pq commented Dec 12, 2011

Fixed: http://codereview.chromium.org/8923010/


Added Fixed label.

@pq pq self-assigned this Dec 12, 2011
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Nov 7, 2022
… webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

crypto (https://github.com/dart-lang/crypto/compare/7cf89d3..e175a95):
  e175a95  2022-11-03  Devon Carew  refactor tests to use a more compact encoding (#134)

dartdoc (https://github.com/dart-lang/dartdoc/compare/179ada0..4b2e01b):
  4b2e01b6  2022-11-03  Sam Rawlins  Deprecate many elements on ModelElement (#3218)
  60cc024a  2022-11-03  Sam Rawlins  Make some logging APIs non-nullable (#3245)
  01c55118  2022-11-03  István Soós  Command-line arguments for limit max file count or total size. (#3231)

file (https://github.com/google/file.dart/compare/b2e31cb..b768f79):
  b768f79  2022-11-07  Devon Carew  add dependabot; run the CI weekly (#203)

intl (https://github.com/dart-lang/intl/compare/dda8ade..442193c):
  442193c  2022-11-07  Fernando Andrade  Fix typo on readme (#506)

shelf (https://github.com/dart-lang/shelf/compare/592656f..5fd2593):
  5fd2593  2022-11-07  Kevin Moore  latest mono_repo
  d1d8dc5  2022-11-07  Kevin Moore  shelf: fix lints (#307)
  64255e5  2022-11-03  Nate Bosch  Prepare to publish shelf_web_socket (#305)

test (https://github.com/dart-lang/test/compare/173a36f..f3fb3ab):
  f3fb3ab6  2022-11-05  stnamco  add lack of description to configuration document (#1782)

test_descriptor (https://github.com/dart-lang/test_descriptor/compare/66f14ce..13dbc20):
  13dbc20  2022-11-07  Kevin Moore  update lints (#45)

webdev (https://github.com/dart-lang/webdev/compare/069b870..47c1c33):
  47c1c33  2022-11-04  Anna Gringauze  Added issue references and removed unused library (#1752)
  542db40  2022-11-04  Anna Gringauze  Update analysis options in dwds (#1777)
  1a36ec8  2022-11-03  Elliott Brooks (she/her)  Send debug info from injected client to the debug extension (#1772)

Change-Id: I65dca831c71fa9487d663cc2a808b78b64424072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268360
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
copybara-service bot pushed a commit that referenced this issue Feb 8, 2023
dartdoc:
494a6bed  2023-02-02  Sam Rawlins  Bump markdown dep to a pre-release of 7.0.0 (#3321)
ad6f1612  2023-02-02  Devon Carew  introduce an environmentProvider abstraction (#3324)
d0b73000  2023-02-02  Sam Rawlins  Prepare testing code for some upcoming Warnings (#3322)
936a7888  2023-02-01  Sam Rawlins  Add text about front-end manual testing (#3286)
cbee812d  2023-02-01  Sam Rawlins  Avoid renaming generator params (#3316)
bcaa0349  2023-02-01  Sam Rawlins  Privatize Library.sdkLib and move getClassByName (#3317)
af32def5  2023-01-31  dependabot[bot]  Bump github/codeql-action from 2.1.39 to 2.2.1 (#3313)
528e97da  2023-01-31  dependabot[bot]  Bump actions/cache from 3.2.3 to 3.2.4 (#3312)
54020672  2023-02-01  Parker Lougheed  Begin changelog for next release after 6.1.5 (#3315)

markdown:
f51c24c  2023-02-01  Zhiguang Chen  Prepend a line ending if the p tag is removed and there is an element before it in a *tight* list (#513)
dd3e3a1  2023-01-31  dependabot[bot]  Bump dart-lang/setup-dart from 1.3 to 1.4 (#510)
5f25fc9  2023-01-31  dependabot[bot]  Bump actions/checkout from 3.2.0 to 3.3.0 (#511)
54266b2  2023-01-31  Kevin Moore  Prepare to release v7.0.0 (#509)
d6ceff9  2023-01-31  Zhiguang Chen  Add line endings before HTML blocks (#508)
ccd3c8b  2023-01-29  Zhiguang Chen  Rewrite link reference definitions (#506)
e8f84dc  2023-01-24  Kevin Moore  Update GFM to 0.29.0.gfm.7 (#507)
93f67b0  2023-01-20  Zhiguang Chen  Add an `enableTagfilter` option to `HtmlRenderer` to eanble GFM `tagfilter` extension (#447)
d110770  2023-01-13  Zhiguang Chen  Rewrite SetextHeaderSyntax (#500)
c1b9bc6  2023-01-09  Sam Rawlins  Migrate from no-implicit-casts to strict-casts (#504)
3e78c08  2023-01-01  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.2.0 (#501)
417747f  2022-12-15  Zhiguang Chen  Refactor list syntax (#499)
30ec05f  2022-11-29  Zhiguang Chen  Do not escape single quote(apostrophe) inside code (#498)
c3d1136  2022-11-29  Zhiguang Chen  introduce a Line class (#494)
Change-Id: I9d971b927b72500ab84cce461a60fe1a86818e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281543
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants