selectable text in dojoDndItem

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

selectable text in dojoDndItem

denov
All,

Is there a way to get let the text inside of a widget that's outer div
has a ' dojoDndItem' class on it?

My widget is a wide rectangle with a drag control in the upper right
with text on the left. My users really want to be able to select the
text for copy/paste into another apps.


Thanks,
Deno

--
www.fullstacksystems.com

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: selectable text in dojoDndItem

dylanks
So I assume the issue is that you're triggering DnD when trying to select the text? Maybe enable a modifier key to select that doesn't trigger the drag event?

> On Feb 23, 2017, at 17:15, Deno Vichas <[hidden email]> wrote:
>
> All,
>
> Is there a way to get let the text inside of a widget that's outer div
> has a ' dojoDndItem' class on it?
>
> My widget is a wide rectangle with a drag control in the upper right
> with text on the left. My users really want to be able to select the
> text for copy/paste into another apps.
>
>
> Thanks,
> Deno
>
> --
> www.fullstacksystems.com
>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|

Re: selectable text in dojoDndItem

denov
No, I'm using a dojoDndHandle which works great.  You can see the issue
with one of the sitepen demos

https://www.sitepen.com/labs/code/eugene/dnd/dnd_handle1.html

You can't select the text to the right of the drag handle.  In my case
the text is a 100x600px widget, the handler is a 24x24px that's in the
upper corner.

At first I thought I could just override the dojoDndItem class that has
-webkit-user-select: none but that seem to work.  Now I'm wondering if
there's something in dojo.dnd.Source



On 2/23/2017 5:16 PM, Dylan Schiemann wrote:

> So I assume the issue is that you're triggering DnD when trying to select the text? Maybe enable a modifier key to select that doesn't trigger the drag event?
>
>> On Feb 23, 2017, at 17:15, Deno Vichas <[hidden email]> wrote:
>>
>> All,
>>
>> Is there a way to get let the text inside of a widget that's outer div
>> has a ' dojoDndItem' class on it?
>>
>> My widget is a wide rectangle with a drag control in the upper right
>> with text on the left. My users really want to be able to select the
>> text for copy/paste into another apps.
>>
>>
>> Thanks,
>> Deno
>>
>> --
>> www.fullstacksystems.com
>>
>> --
>> Dojo Toolkit: http://dojotoolkit.org/
>> Tutorials: http://dojotoolkit.org/documentation/
>>
>> [hidden email]
>> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
www.fullstacksystems.com

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: selectable text in dojoDndItem

denov
anyone?


On 2/23/2017 5:24 PM, Deno Vichas wrote:

> No, I'm using a dojoDndHandle which works great.  You can see the issue
> with one of the sitepen demos
>
> https://www.sitepen.com/labs/code/eugene/dnd/dnd_handle1.html
>
> You can't select the text to the right of the drag handle.  In my case
> the text is a 100x600px widget, the handler is a 24x24px that's in the
> upper corner.
>
> At first I thought I could just override the dojoDndItem class that has
> -webkit-user-select: none but that seem to work.  Now I'm wondering if
> there's something in dojo.dnd.Source
>
>
>
> On 2/23/2017 5:16 PM, Dylan Schiemann wrote:
>> So I assume the issue is that you're triggering DnD when trying to select the text? Maybe enable a modifier key to select that doesn't trigger the drag event?
>>
>>> On Feb 23, 2017, at 17:15, Deno Vichas <[hidden email]> wrote:
>>>
>>> All,
>>>
>>> Is there a way to get let the text inside of a widget that's outer div
>>> has a ' dojoDndItem' class on it?
>>>
>>> My widget is a wide rectangle with a drag control in the upper right
>>> with text on the left. My users really want to be able to select the
>>> text for copy/paste into another apps.
>>>
>>>
>>> Thanks,
>>> Deno
>>>
>>> --
>>> www.fullstacksystems.com
>>>
>>> --
>>> Dojo Toolkit: http://dojotoolkit.org/
>>> Tutorials: http://dojotoolkit.org/documentation/
>>>
>>> [hidden email]
>>> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: selectable text in dojoDndItem

denov
In reply to this post by denov
it looks like there's a bug in onSelectStart() in Container.js.  I'm not familiar with this code but it looks like it's not checking to see if the user is user handles and expecting the whole source to be dragable.  with little testing this appears to fix my issue.

onSelectStart: function(e){
   // summary:
   //    event processor for onselectevent and ondragevent
   // e: Event
   //    mouse event

   if(!this.withHandles && (!this.skipForm || !dnd.isFormElement(e))){
      e.stopPropagation();
      e.preventDefault();
   }
},



- deno



On 2/23/2017 5:24 PM, Deno Vichas wrote:
No, I'm using a dojoDndHandle which works great.  You can see the issue
with one of the sitepen demos

https://www.sitepen.com/labs/code/eugene/dnd/dnd_handle1.html

You can't select the text to the right of the drag handle.  In my case
the text is a 100x600px widget, the handler is a 24x24px that's in the
upper corner.

At first I thought I could just override the dojoDndItem class that has
-webkit-user-select: none but that seem to work.  Now I'm wondering if
there's something in dojo.dnd.Source



On 2/23/2017 5:16 PM, Dylan Schiemann wrote:
So I assume the issue is that you're triggering DnD when trying to select the text? Maybe enable a modifier key to select that doesn't trigger the drag event?

On Feb 23, 2017, at 17:15, Deno Vichas [hidden email] wrote:

All,

Is there a way to get let the text inside of a widget that's outer div
has a ' dojoDndItem' class on it?

My widget is a wide rectangle with a drag control in the upper right
with text on the left. My users really want to be able to select the
text for copy/paste into another apps.


Thanks,
Deno

-- 
www.fullstacksystems.com

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



-- 
www.fullstacksystems.com

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: selectable text in dojoDndItem

dylanks
This looks reasonable and makes sense. Do you want to raise a PR and
I'll test further, review, and hopefully land it soon?

Regards,
-Dylan

on 3/7/17, 22:15 (GMT-07:00) Deno Vichas said the following:

> it looks like there's a bug in onSelectStart() in Container.js.  I'm not
> familiar with this code but it looks like it's not checking to see if
> the user is user handles and expecting the whole source to be dragable.
> with little testing this appears to fix my issue.
>
> onSelectStart: function(e){
>    // summary:
>    //    event processor for onselectevent and ondragevent
>    // e: Event
>    //    mouse event
>
>    if(!this.withHandles && (!this.skipForm || !dnd.isFormElement(e))){
>       e.stopPropagation();
>       e.preventDefault();
>    }
> },
>
>
>
>
> - deno
>
>
>
> On 2/23/2017 5:24 PM, Deno Vichas wrote:
>> No, I'm using a dojoDndHandle which works great.  You can see the issue
>> with one of the sitepen demos
>>
>> https://www.sitepen.com/labs/code/eugene/dnd/dnd_handle1.html
>>
>> You can't select the text to the right of the drag handle.  In my case
>> the text is a 100x600px widget, the handler is a 24x24px that's in the
>> upper corner.
>>
>> At first I thought I could just override the dojoDndItem class that has
>> -webkit-user-select: none but that seem to work.  Now I'm wondering if
>> there's something in dojo.dnd.Source
>>
>>
>>
>> On 2/23/2017 5:16 PM, Dylan Schiemann wrote:
>>> So I assume the issue is that you're triggering DnD when trying to select the text? Maybe enable a modifier key to select that doesn't trigger the drag event?
>>>
>>>> On Feb 23, 2017, at 17:15, Deno Vichas <[hidden email]> wrote:
>>>>
>>>> All,
>>>>
>>>> Is there a way to get let the text inside of a widget that's outer div
>>>> has a ' dojoDndItem' class on it?
>>>>
>>>> My widget is a wide rectangle with a drag control in the upper right
>>>> with text on the left. My users really want to be able to select the
>>>> text for copy/paste into another apps.
>>>>
>>>>
>>>> Thanks,
>>>> Deno
>>>>
>>>> --
>>>> www.fullstacksystems.com
>>>>
>>>> --
>>>> Dojo Toolkit: http://dojotoolkit.org/
>>>> Tutorials: http://dojotoolkit.org/documentation/
>>>>
>>>> [hidden email]
>>>> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>
>
> --
> www.fullstacksystems.com
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|

Re: selectable text in dojoDndItem

denov
https://bugs.dojotoolkit.org/ticket/18986

hopefully that's what you need/want.


On 3/8/2017 7:00 AM, Dylan Schiemann wrote:

> This looks reasonable and makes sense. Do you want to raise a PR and
> I'll test further, review, and hopefully land it soon?
>
> Regards,
> -Dylan
>
> on 3/7/17, 22:15 (GMT-07:00) Deno Vichas said the following:
>> it looks like there's a bug in onSelectStart() in Container.js.  I'm not
>> familiar with this code but it looks like it's not checking to see if
>> the user is user handles and expecting the whole source to be dragable.
>> with little testing this appears to fix my issue.
>>
>> onSelectStart: function(e){
>>    // summary:
>>    //    event processor for onselectevent and ondragevent
>>    // e: Event
>>    //    mouse event
>>
>>    if(!this.withHandles && (!this.skipForm || !dnd.isFormElement(e))){
>>       e.stopPropagation();
>>       e.preventDefault();
>>    }
>> },
>>
>>
>>
>>
>> - deno
>>
>>
>>
>> On 2/23/2017 5:24 PM, Deno Vichas wrote:
>>> No, I'm using a dojoDndHandle which works great.  You can see the issue
>>> with one of the sitepen demos
>>>
>>> https://www.sitepen.com/labs/code/eugene/dnd/dnd_handle1.html
>>>
>>> You can't select the text to the right of the drag handle.  In my case
>>> the text is a 100x600px widget, the handler is a 24x24px that's in the
>>> upper corner.
>>>
>>> At first I thought I could just override the dojoDndItem class that has
>>> -webkit-user-select: none but that seem to work.  Now I'm wondering if
>>> there's something in dojo.dnd.Source
>>>
>>>
>>>
>>> On 2/23/2017 5:16 PM, Dylan Schiemann wrote:
>>>> So I assume the issue is that you're triggering DnD when trying to select the text? Maybe enable a modifier key to select that doesn't trigger the drag event?
>>>>
>>>>> On Feb 23, 2017, at 17:15, Deno Vichas <[hidden email]> wrote:
>>>>>
>>>>> All,
>>>>>
>>>>> Is there a way to get let the text inside of a widget that's outer div
>>>>> has a ' dojoDndItem' class on it?
>>>>>
>>>>> My widget is a wide rectangle with a drag control in the upper right
>>>>> with text on the left. My users really want to be able to select the
>>>>> text for copy/paste into another apps.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Deno
>>>>>
>>>>> --
>>>>> www.fullstacksystems.com
>>>>>
>>>>> --
>>>>> Dojo Toolkit: http://dojotoolkit.org/
>>>>> Tutorials: http://dojotoolkit.org/documentation/
>>>>>
>>>>> [hidden email]
>>>>> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>> --
>> www.fullstacksystems.com
>>


--
www.fullstacksystems.com

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest