Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text-selection breaks normal selection #103

Closed
kartofelek007 opened this issue Apr 10, 2021 · 1 comment
Closed

Text-selection breaks normal selection #103

kartofelek007 opened this issue Apr 10, 2021 · 1 comment
Labels
documentation Dokumentation is inadequate invalid This doesn't seem right

Comments

@kartofelek007
Copy link

What is the problem?

When I start second selection in middle of previous then cursor not allowed appears, and selection not start.

What is the current behavior?

I select some elements. This work very well. After that I start new selection. If I start it above or below previous - this still works well. But if I start it in middle of previous selection - new selection will not start.
This was worked well in 1.7

Please provide the steps to reproduce and create a JSFiddle.

ver 1.7
1 7
As you see everything working wery well

ver 2.3
2 3
If I start new selection from middle of previus, selection will not start

In fiddle with example (https://jsfiddle.net/Simonwep/wez9o7cu/) this issue also occurs.

Code for v1.7

const selection = new Selection({
    class: 'selection',
    frame: document,
    startThreshold: 10,
    disableTouch: false,
    mode: 'touch',
    tapMode: 'native',
    singleClick: true,
    selectables: [
        ".palette-element"
    ],
    startareas: ['html'],
    boundaries: ['html'],
    selectionAreaContainer: 'body',
    scrollSpeedDivider: 10,
    manualScrollSpeed: 750
})

Code for v2.3 (but i comment all events ant this issue still exist)

const selection = new Selection({
    class: 'selection',
    startThreshold: 10,

    singleTap: {
        allow: true,
        intersect: 'touch'
    },

    allowTouch: false,
    overlap: 'invert',
    selectables: [
        ".palette-element"
    ],
    startareas: ['html'],
    boundaries: ['html'],

    scrolling: {
        speedDivider: 10,
        manualSpeed: 750
    }
})

What is the expected behavior?

work fine like version 1.7

Your environment:

Version (SelectionArea.version): 2.3
Browser: Chrome  
OS:  Windows 10
@simonwep simonwep added documentation Dokumentation is inadequate invalid This doesn't seem right labels Apr 10, 2021
@simonwep simonwep changed the title broken selection Text-selection breaks normal selection Apr 10, 2021
@simonwep
Copy link
Owner

simonwep commented Apr 10, 2021

Caused by #99 - a simple fix for that is adding user-select: none; to the container. I'll add that to the docs, I don't consider this an issue yet. I'll take a look at it later.

I updated the README for now, please refer to #97 and #99 for more information.

@simonwep simonwep mentioned this issue Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Dokumentation is inadequate invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants