             @element.unbind "focus", @_activated
             @element.unbind "blur", @_deactivated
             @element.unbind "keyup paste change", this, @_checkModified
+            @element.unbind "keyup", @_keys
             @element.unbind "keyup mouseup", this, @_checkSelection
             @bound = false
 

                if not @options.showAlways
                    @element.bind "blur", this, @_deactivated
                @element.bind "keyup paste change", this, @_checkModified
                @element.bind "keyup mouseup", this, @_checkSelection
                widget = this
                @bound = true

                    ranges: [widget.selection]
                    originalEvent: event

        turnOn: () ->
            jQuery(@element).addClass 'inEditMode'
            #make sure the toolbar has not got the full width of the editable element when floating is set to true
            if !@options.floating
                el = jQuery(@element)
                widthToAdd = parseFloat el.css('padding-left')
                widthToAdd += parseFloat el.css('padding-right')
                widthToAdd += parseFloat el.css('border-left-width')
                widthToAdd += parseFloat el.css('border-right-width')
                widthToAdd += (parseFloat el.css('outline-width')) * 2
                widthToAdd += (parseFloat el.css('outline-offset')) * 2
                jQuery(@toolbar).css "width", el.width()+widthToAdd
            else
                @toolbar.css "width", "auto"
            @_trigger "activated", event

        turnOff: () ->
            @toolbar.hide()
            jQuery(@element).removeClass 'inEditMode'
            if (@options.showAlways)
                @element.blur()
            @_trigger "deactivated", @

        _activated: (event) ->
            event.data.turnOn()

        _deactivated: (event) ->
            event.data.turnOff()


)(jQuery)
