WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#17523 closed enhancement (fixed)

Namespace events in common.js for tabs in textareas

Reported by: wjbryant Owned by:
Priority: normal Milestone: 3.2
Component: Administration Version: 3.2
Severity: normal Keywords: has-patch
Cc: azaozz

Description

In common.js, event handlers are assigned to the textarea in the theme and plugin editors to insert tab characters when the tab key is pressed. It would be nice if these events were "namespaced" so they could be easily targeted for unbinding. See http://docs.jquery.com/Namespaced_Events.

In my Tab Override plugin, I have to resort to analyzing the code for each event handler to determine which ones are safe to remove. This is not very reliable.

I attached an example that uses wpTabKey as the event namespace. It would be great if this could make it into 3.2!

Thanks!

Attachments (1)

common.dev.patch (569 bytes) - added by wjbryant 2 years ago.
Patch to add namespace to tab key events

Download all attachments as: .zip

Change History (4)

wjbryant2 years ago

Patch to add namespace to tab key events

comment:1 kawauso2 years ago

  • Keywords has-patch added

comment:2 ocean902 years ago

  • Cc azaozz added

Related: [17979] (Maybe by mistake?)

comment:3 azaozz2 years ago

  • Component changed from Editor to Administration
  • Milestone changed from Awaiting Review to 3.2
  • Resolution set to fixed
  • Status changed from new to closed

In [17979]

Note: See TracTickets for help on using tickets.