Code Monkey home page Code Monkey logo

Comments (3)

ajwfrost avatar ajwfrost commented on August 18, 2024 1

Thanks
So the key factors were the embedded fonts and the lack of word wrap.
With embedded fonts, there are some re-calculations done to the mouse event so that it can be translated into a row/column position. But then when we're out of the area, we trigger the auto-scroll functionality (assuming word wrap is off) and this is where it was going wrong .. the translated point was being fed back into the handler to work out where to extend the selection to, but the mouse translation was then being applied again -> suddenly it thought the mouse was way off to the bottom left somewhere...
Should be a generic fix for this kind of situation.
thanks

from adobe-runtime-support.

ylazy avatar ylazy commented on August 18, 2024

I added the code below to easily reproduce the problem:

FontManager.embed(Arial); // embed the Arial font

var format:TextFormat = new TextFormat();
format.font = "Arial";

var tf:TextField = new TextField();
tf.defaultTextFormat = format;
tf.border = true;
tf.width = 300;
tf.height = 200;
tf.wordWrap = false;
tf.multiline = true;
tf.type = TextFieldType.DYNAMIC;
tf.selectable = true;
tf.embedFonts = true;
tf.text = "first line\nsecond line\nthird line";
addChild(tf);
Video_240624092302_Slice_Slice.mp4

The issue only happens with embed fonts.
Click on any position in the middle of the second line, then move to the left/right until the mouse fall outside the text field, you can see the selection will be blinked and incorrect.

from adobe-runtime-support.

ylazy avatar ylazy commented on August 18, 2024

Fixed on AIR SDK 51.0.1.4.

Thanks!

from adobe-runtime-support.

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.