mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 14:33:59 -04:00
Stop whole-line selection on gutter clicks.
This commit is contained in:
parent
05a3577de9
commit
01d6c6d239
1 changed files with 5 additions and 0 deletions
|
@ -106,6 +106,7 @@ module.exports = class SpellView extends CocoView
|
|||
@toggleControls null, @writable
|
||||
@aceSession.selection.on 'changeCursor', @onCursorActivity
|
||||
$(@ace.container).find('.ace_gutter').on 'click mouseenter', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
||||
$(@ace.container).find('.ace_gutter').on 'click', @onGutterClick
|
||||
@initAutocomplete aceConfig.liveCompletion ? true
|
||||
|
||||
createACEShortcuts: ->
|
||||
|
@ -796,6 +797,9 @@ module.exports = class SpellView extends CocoView
|
|||
# @ is the gutter element
|
||||
Backbone.Mediator.publish 'tome:jiggle-problem-alert', {}
|
||||
|
||||
onGutterClick: =>
|
||||
@ace.clearSelection()
|
||||
|
||||
onDisableControls: (e) -> @toggleControls e, false
|
||||
onEnableControls: (e) -> @toggleControls e, @writable
|
||||
toggleControls: (e, enabled) ->
|
||||
|
@ -882,6 +886,7 @@ module.exports = class SpellView extends CocoView
|
|||
|
||||
destroy: ->
|
||||
$(@ace?.container).find('.ace_gutter').off 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
|
||||
$(@ace?.container).find('.ace_gutter').off 'click', @onGutterClick
|
||||
@firepad?.dispose()
|
||||
@ace?.commands.removeCommand command for command in @aceCommands
|
||||
@ace?.destroy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue