Skip to content

Commit

Permalink
[fix]: Focus conflict when use editor inside Jetstream modal
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedsabil83 committed Mar 13, 2024
1 parent b718ef7 commit 3f56e2d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@ name: run-tests

on:
push:
branches: [1.x]
branches: [ 1.x ]
pull_request:
branches: [1.x]
branches: [ 1.x ]

jobs:
test:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1]
laravel: [10.*, 9.*]
stability: [prefer-lowest, prefer-stable]
os: [ ubuntu-latest ]
php: [ 8.2, 8.1 ]
laravel: [ 10.*, 9.* ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: 10.*
testbench: 8.*
carbon: ^2.63
- laravel: 9.*
testbench: 7.*
carbon: ^2.63

runs-on: ${{ matrix.os }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
Expand All @@ -44,11 +42,8 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
run: composer show -D

- name: Execute tests
run: vendor/bin/pest --ci
Empty file removed resources/views/.gitkeep
Empty file.
12 changes: 12 additions & 0 deletions resources/views/tiny-editor.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,23 @@ class="relative z-0"
editor.on('OpenWindow', function(e) {
target = e.target.container.closest('.filament-modal')
if (target) target.setAttribute('x-trap.noscroll', 'false')
target = e.target.container.closest('.jetstream-modal')
if (target) {
targetDiv = target.children[1]
targetDiv.setAttribute('x-trap.inert.noscroll', 'false')
}
})
editor.on('CloseWindow', function(e) {
target = e.target.container.closest('.filament-modal')
if (target) target.setAttribute('x-trap.noscroll', 'isOpen')
target = e.target.container.closest('.jetstream-modal')
if (target) {
targetDiv = target.children[1]
targetDiv.setAttribute('x-trap.inert.noscroll', 'show')
}
})
function putCursorToEnd() {
Expand Down

0 comments on commit 3f56e2d

Please sign in to comment.