unicorn-fail / dreditor

The "Dreditor" browser extension for Drupal.org.
https://www.drupal.org/project/dreditor
GNU General Public License v2.0
72 stars 36 forks source link

Fix targety textarea stuff for issue #257 #272

Closed joelpittet closed 8 years ago

joelpittet commented 8 years ago

Here's a proof of concept. http://jsfiddle.net/0ranruft/

markhalliwell commented 8 years ago

Overall this is an OK approach, however I think we should get away from targeting selectors at all. It should really be more abstract where we're only tracking an $active textarea that a user last focused on. This would allow the feature to be more "break proof" in the future.

joelpittet commented 8 years ago

Ok how about this then? http://jsfiddle.net/0ranruft/1/

joelpittet commented 8 years ago

Mark had some concerns about manipulating data attributes in focus events over IRC. My last change is the same thing but with a global $target keeping track instead of the data-attribute. http://jsfiddle.net/0ranruft/5/

joelpittet commented 8 years ago

Thank you Mark, first real githuby pull request I think for me with a pull request! love how the commits just magically add themselves up in the pull request. Like patches but more magical!