Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

Use space-pen dependencies for input views#545

Closed
MattKunze wants to merge 4 commits into
atom:masterfrom
MattKunze:space-pen-views
Closed

Use space-pen dependencies for input views#545
MattKunze wants to merge 4 commits into
atom:masterfrom
MattKunze:space-pen-views

Conversation

@MattKunze
Copy link
Copy Markdown

This probably isn't the best way to fix this, the views seem to be deprecated. Not sure how to go about replacing the views with an <atom-text-editor> though

fixes #544

@MattKunze
Copy link
Copy Markdown
Author

Doh, seems to fail a bunch of tests somehow. Not sure if it makes more sense to update the tests against the deprecated views, or update how the input editor view works

@MattKunze
Copy link
Copy Markdown
Author

Most of the failing tests seem to stem from needing to change how events are bound to the text editor now that it uses shadow DOM. I can update the bindings with

  handleEvents: ->
    input = $ @editor[0].rootElement.querySelector 'input'
    if @singleChar?
      input.on 'textInput', @autosubmit
    @editor.on 'core:confirm', @confirm
    @editor.on 'core:cancel', @cancel
    input.on 'blur', @cancel

and single character motions are working again, but the specs still are failing

@MattKunze
Copy link
Copy Markdown
Author

@maxbrunsfeld - I was able to return to this and get the tests to work, the specs had the same issue getting a reference to the text editor input through the shadow DOM mentioned above.

It seems like there has to be a better way to hook to the input, but I couldn't find it in the docs. I'd be happy to update if someone would point me in the right direction

@tmm1
Copy link
Copy Markdown
Contributor

tmm1 commented Mar 20, 2015

Issue is fixed on master.

@tmm1 tmm1 closed this Mar 20, 2015
@maxbrunsfeld
Copy link
Copy Markdown
Contributor

Hey @MattKunze, didn't mean to ignore this. @tmm1 and I ended up fixing this a different way with the added benefit of not relying on jQuery any more.

@MattKunze
Copy link
Copy Markdown
Author

No worries, just glad to see the issue fixed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search text not displaying using /

3 participants