Can't select panel text



I created an element with the following code:

@content: ->
    @div class: 'inset-panel panel-bottom run-command', =>
      @div class: 'panel-heading', =>
        @span 'Command: '
        @span outlet: 'header'
      @div class: 'panel-body padded results', outlet: 'resultsContainer', =>
        @pre '', outlet: 'results'

# In my show function
@panel ?= atom.workspace.addModalPanel(item: this)

When I try to select the text of this element nothing happens. Is this the expected behavior? And if so how to I make the text of this panel selectable?


Almost every panel in every package, including mine, has this problem. Let me know if/when you find a fix.


The panel in bug-report has selectable text:

I don’t know why that would be versus the code that is mentioned above, but maybe it’s a start?


Can you actually copy the text?


So this allows you to highlight it

@div class: 'inset-panel panel-bottom run-command', tabindex: -1, =>

But doesn’t allow copying.

@div class: 'inset-panel panel-bottom run-command native-key-bindings', tabindex: -1, =>

Allows for highlighting and copying. Thanks for leading me to that repo leedohm!


Ah yes … the infamous native-key-bindings strikes again! :grinning:


How would I get this to work on the below code?

   `module.exports =
    class MyFirstCsPackageView
    constructor: (serializedState) ->
    # Create root element
    @element = document.createElement('div')

    # Create message element
    message = document.createElement('div')
    message.textContent = "The MyFirstCsPackage package is Alive! It's ALIVE!"

  # Returns an object that can be retrieved when package is activated
  serialize: ->

  # Tear down any state and detach
  destroy: ->

  getElement: ->

  setCount: (count) ->
    displayText = "SAQL JSON: #{count}"
    @element.children[0].textContent = displayText