No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. OrthoCube
    O
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Groups 0

    OrthoCube

    @OrthoCube

    0
    Reputation
    107
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    OrthoCube Follow

    Latest posts made by OrthoCube

    • RE: [SOLVED] Getting textarea current cursor position

      @metalsadman Thank you very much! Didn’t see that when I searched.

      posted in Help
      O
      OrthoCube
    • [SOLVED] Getting textarea current cursor position

      I’m trying to create my own in-app keyboard used for inputting custom characters to the textarea, however, it’s not possible to insert characters in the middle of the input by detecting the position of the cursor and inserting the character there.

      Getting cursor position (and selected text position) seems to be possible in plain HTML/JS using something like this

      var cursorPosition = $('#myTextarea').prop("selectionStart");
      

      but I can’t see how I can implement that on a <q-input>.

      Is there any way to get the current cursor position (or selected position) from a q-input?

      Thanks in advance.

      posted in Help
      O
      OrthoCube
    • RE: Choosing different layout vue files depending on platform

      @rstoenescu This is just the default SPA. this in the routes.js file does not seem to point to Vue’s this so I can’t access $q. I have found a way, by using one layout but with a couple of v-ifs, choosing which to display based on the platform, but maybe there’s a better way to this… I just thought.

      posted in Help
      O
      OrthoCube
    • RE: Choosing different layout vue files depending on platform

      @rstoenescu Unfortunately, it seems that this is undefined even when using normal functions.

      component: function () {
        return this.$q.platform.is.mobile ? import('layouts/MobileLayout.vue') : import('layouts/DesktopLayout.vue')
      },
      posted in Help
      O
      OrthoCube
    • Choosing different layout vue files depending on platform

      I would like to use different vue layout files depending on the platform used (desktop / mobile). I thought it might be possible by modifying routes.

      component: () => {
          this.$q.platform.is.mobile ? import('layouts/MobileLayout.vue') : import('layouts/DesktopLayout.vue')
      }
      

      but it seems that $q is not accessible from the this instance from the routes. I was thinking that it’d be as simple as this but it seems it isn’t.

      In the end, do I just have to use a single layout and just use v-if all over to choose what to display?

      I found a post on this forum that is asking the same thing, and the answer just says that “you can use multiple layouts, you are not limited to using just one” which is true, if the path determines which layout to use (for example, www.mysite.com/mobile/posts compared to www.mysite.com/posts) but how do I use the same path but choose which layout to use depending on platform?

      Thanks in advance.

      posted in Help
      O
      OrthoCube