Code Monkey home page Code Monkey logo

Comments (11)

mbarzeev avatar mbarzeev commented on May 26, 2024

+1

from textangular.

mbarzeev avatar mbarzeev commented on May 26, 2024

It seems to be a focus issue of the editor.
removing the focus (any focus for that metter) before I've updated the model seemed to solve it, like so:

$( ":focus" ).blur();

Hope it helps.

from textangular.

worldspawn avatar worldspawn commented on May 26, 2024

I'm updating model in response to a button click so the text angular widget should have already lost focus no? Or are you saying we just need a blur event somewhere (anywhere) in the dom?

from textangular.

mbarzeev avatar mbarzeev commented on May 26, 2024

For me, pressing a different nested element on the view surprisingly didn't blurred the editor (see if it has the focus border to make sure).
Try what I've suggested above.

from textangular.

SimeonC avatar SimeonC commented on May 26, 2024

Quick note - I have the fix prepped and will commit it when I can, internet is sporadic while I'm in India till the end of Jan. The issue is with the checks that prevent it from updating when ng-model is undefined. Removing those if statements seems to fix the issue but I have to go back and figure out why it was there in the first place.

from textangular.

SimeonC avatar SimeonC commented on May 26, 2024

@matti I think the reason the editor toolbar buttons don't blur the editor is that they have unselectable set on them, else you wouldn't be able to keep typing after pressing one of the buttons.

from textangular.

matti avatar matti commented on May 26, 2024

@SimeonC I believe you meant @mbarzeev

from textangular.

mbarzeev avatar mbarzeev commented on May 26, 2024

hmmm... I don't think so ;)

from textangular.

SimeonC avatar SimeonC commented on May 26, 2024

@matti yea thanks, It was a guess from the email name that came through.

@mbarzeev The focus issue is possibly unrelated, once the undefined bug is fixed clicking on a button that uses ng-click will clear the editor correctly due to the $digest that gets triggered. There's code in place to try prevent blur being triggered on the editor when an editor toolbar button is pressed (I assume this is what you meant by nested element on the view). If this isn't the case could you open a new issue with how to replicate it please?

from textangular.

mbarzeev avatar mbarzeev commented on May 26, 2024

Nop, I didn't mean the toolbar buttons (they work as expected as far as I can tell), I'm talking about an issue where a nested element, external to the editor altogether, did not remove the focus from the editor itself. Weird, I know...
I don't believe I will have the time to create a nice Fiddle example, and I found a workaround (as mentioned above) which fixed it.
Still be be nice to know when the fix you we're referring to will be available.

Thanks for the help and responsiveness.

from textangular.

worldspawn avatar worldspawn commented on May 26, 2024

Hullo, thanks for the fix. Its working like a charm.

from textangular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.